Thursday, March 22, 2012

WebApp conection to SQLServer in Intanet using diff. Servers

I'm not really a programmer. I use VS.NET to write some application to make easier my job in an engineering firm. I have following problem:
1.My machine works in an intranet. I am the administrator of my computer which runs under Windows XP platform. I use an userID and password to login.
2.I have also installed the VS.NET in my computer and I wrote a Web Application with connection to a SQL Server Data Base. This DBSQL is located in other Server inside of our intranet.
3.When I try to test the Web Application in Browser I get a connection error, but using the same Form design and connection string, in a Windows Application, it works fine.
Could someone help me, or the peaces of information I gave above are not sufficient to give an idea what is going on?
Thanks in advance,
MiresThis is probably because when connecting from an ASP.NET website, the "user" attempting the connection is the ASPNET account that was created on your machine when you installed the .NET Framework.

When you run the Windows application, it uses your Windows account login context (the user account you use to login into your machine).

You could try using Impersonation in your ASP.NET application to get around this. Or (less secure), if you have appropriate access to the SQL Server, you could add the ASPNET user account (of your local machine) to the list of valid users for your database.

HTH...

Chris
Thanks a lot. It's working now! For information to people with the same problem I used:
"HOW TO : Configure SQL Server Security for .NET Applications" at the address
http://suport.microsoft.com/default.aspx?kbid=815154

Mires
I apologize...I actually _meant_ to include that link in my first post... :-)

Here is a clickable link:

HOW TO : Configure SQL Server Security for .NET Applications

Chris

0 comments:

Post a Comment