Click here to Skip to main content
14,268,557 members
Rate this:
Please Sign up or sign in to vote.
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...
Rate this:
Please Sign up or sign in to vote.

Solution 1

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

In case needed, try for more here[^].
   
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.
Rate this:
Please Sign up or sign in to vote.

Solution 2

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.
   
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100