Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have developed an ASP.Net website using vb.net in Visual Studio 2008(and MS SQL Server 2008).

I completed my design and have configured my website using website administration tool. Then I published and linked to a new virtual directory in IIS.

I'm albe to get access to all pages with access rule set as " allow anonymous users", but I'm not albe to have access to restricted pages with user login. When I'm accesssing these pages its going to the login dialog box, but even if I enter the correct username and password, its not workin out and an error page is displayed as:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: An attempt to attach an auto-named database for file C:\Documents and Settings\jasmin1\My Documents\Visual Studio 2008\WebSites\JASMIN\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

But When I'm trying to debug it fro Visual studio it is working properly.

Pls help...
Posted
Updated 5-Oct-10 23:07pm
v2
Comments
Sandeep Mewara 6-Oct-10 5:33am    
Looks like some config issue...

Have a look at these discussions:
Discussion 1[^]
Discussion 2[^]

In case needed, try for more here[^].
 
Share this answer
 
Comments
jasminkp 7-Oct-10 4:19am    
I tried out many things there but still i got the error. Now the error is

Cannot open user default database. Login failed.
Login failed for user 'JASMIN\ASPNET'.
Sandeep Mewara 7-Oct-10 7:27am    
You need to give permission to use JASMIN\ASPNET. Go to security option of the database and add it.
jasminkp 18-Oct-10 3:37am    
thank you.. its ok now
Dalek Dave 18-Oct-10 3:53am    
Good Answer.
Now its working fine in the local system but when i try to access this site from a remote computer in the LAN in my office its is not possible. Pls Help............

I tried to access it using the computer name and the IP Address.
 
Share this answer
 
v2
Comments
jasminkp 18-Oct-10 4:07am    
pls help me.......... am on my final stage of my project and am totally lost now... tried out many solution available in the internet........

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900