Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Web Form cannot access SQl table
Message
 
To
05/10/2004 14:34:18
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
00948879
Message ID:
00948922
Views:
13
>I have a SQL Server database residing on my PC. I can successfully query tables in this database from a .Net WinForm. However, if I attempt to perform the same queries using a .Net WebForm, I get the following error message:
>
>--------------
>Server Error in '/myappfolder' Application.
>Login failed for user 'Mydomain\Userid'.
>--------------
>
>Why can I query the SQL Server tables within a WinForm but not within a WebForm?
>
>What can I do to correct this problem?
>
>Thanks,
>
>Jerry

Jerry;

Winforms and Webforms are different animals! :)

Here is something I created after resolving the issues below. There are many types of security and this is only one - perhaps not the "best". I hope something here helps you.

ASP NET Login Issues for anonymous users
Problem:

Error message – Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON’.

Reason:

IIS not set correctly

Resolution:

1.	Open IIS
2.	Go to Default Web Site
3.	Right Click on Web Project of interest
4.	Select Properties
5.	Select Directory Security
6.	Go to “Anonymous access and authentication control”
7.	Select “Edit”
8.	Uncheck “Anonymous access”
9.	Select OK
10.	Select Apply
11.	Select OK

Problem:

Error message – Login failed for user ‘(null)’. Reason”: Not associated with a trusted SQL Server connection.

Reason:

IIS and/or Web.config may not be set correctly

Resolution:

See above to set IIS.

In the Web.config file add the following line after the <system.web> tag and before the </system.web> end tag

<identity impersonate = "true"/>
Tom
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform