Showing posts with label aspnet. Show all posts
Showing posts with label aspnet. Show all posts

Thursday, March 29, 2012

Environment and Application Domain between ASP.NET & SQL Server

Hi all,

I have posted the same topic under ASP-NET-Developers but had no reply;
I then posted it under ASP.Net Community and had also no reply.
Hence, i'm posting it here to prevent the impression of spam post ...

I have created a SqlContextTrigger using ADO.NET 2.0 to create a
trigger on
SQL Server 2005.

In the class, I create a file and specify its path to be in the
Application
Domain base directory such as:

String Path = AppDomain.CurrentDomain.BaseDirectory.ToString()

However, the path is always the SQL Server Binn Directory. I'd like to
tell
the program that I want the path to be related not to SQL Server Binn
Directory but to Visual Studio Solution's Project Bin Directory.

How do I do that?

Best regards> However, the path is always the SQL Server Binn Directory. I'd like to
> tell
> the program that I want the path to be related not to SQL Server Binn
> Directory but to Visual Studio Solution's Project Bin Directory.

I doubt that you will find anything built-in that will do this. The trigger
thread is running in SQL Server and has no knowledge of your client folder
structure nor a means to access it.

One method to accomplish the desired result is to store the desired target
path in a table so that you can retrieve the value from within your trigger
code. If the path is remote, you'll need to use a UNC path and additional
security considerations apply.

I'm not sure what you are trying to do but you might take a look at Service
Broker.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"coosa" <coosa76@.gmail.com> wrote in message
news:1136546993.487438.187050@.o13g2000cwo.googlegr oups.com...
> Hi all,
> I have posted the same topic under ASP-NET-Developers but had no reply;
> I then posted it under ASP.Net Community and had also no reply.
> Hence, i'm posting it here to prevent the impression of spam post ...
> I have created a SqlContextTrigger using ADO.NET 2.0 to create a
> trigger on
> SQL Server 2005.
> In the class, I create a file and specify its path to be in the
> Application
> Domain base directory such as:
> String Path = AppDomain.CurrentDomain.BaseDirectory.ToString()
> However, the path is always the SQL Server Binn Directory. I'd like to
> tell
> the program that I want the path to be related not to SQL Server Binn
> Directory but to Visual Studio Solution's Project Bin Directory.
> How do I do that?
> Best regardssql

Sunday, February 26, 2012

Enterprise Manager confusion

Ok i know that the main reason for the error that contains

System.Data.OleDb.OleDbException: Login failed for user 'BEDROOM\ASPNET'.
is because i do not have the ASPNET registered.
From what i have been told i need Enterprise Manager.
I HAVE NO CLUE WHERE TO GET IT OR HOW TO CONFIGURE IT OR ANYTHING OF IT
sorry for the caps.
I have search on here and google and nothing
any help
thanks
It is not a stand alone product, it is part of SQL Server 2000, try the link below to test drive the full version of SQL Server. Hope this helps.
http://www.microsoft.com/sql/evaluation/trial/default.mspx|||

base836ball wrote:

Ok i know that the main reason for the error that contains

System.Data.OleDb.OleDbException: Login failed for user 'BEDROOM\ASPNET'.
is because i do not have the ASPNET registered.
From what i have been told i need Enterprise Manager.
I HAVE NO CLUE WHERE TO GET IT OR HOW TO CONFIGURE IT OR ANYTHING OF IT
sorry for the caps.
I have search on here and google and nothing
any help
thanks


Inthis previous threadyou said you already had Enterprise Manager. Sorry I didn'tfollow up with your question there, the open source part of yourresponse confused me and I forgot to respond.
You do notneed Enterprise Manager. You can perform the needed commands from the command line using the osql utility.
You might findHow To Manage the SQL Server Desktop Engine (MSDE 2000) by Using the Osql Utility to be helpful. In an osql session you will need to execute these commands:
EXEC sp_grantlogin 'BEDROOM\ASPNET'
GO
USE yourDatabase
GO
EXEC sp_grantdbaccess 'BEDROOM\ASPNET', 'ASPNET'
GO
Seethis post andthis post for more step-by-step instructions that I've given in the past.
|||BEAUTIFUL!!!!!
Thanks. Everything is up and operational