在本地服务器上发布asp.net网站 [英] publish asp.net website in local server

查看:67
本文介绍了在本地服务器上发布asp.net网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Visual Studio 2008(和MS SQL Server 2008)中使用vb.net开发了一个ASP.Net网站.

我完成了设计,并使用网站管理工具配置了我的网站.然后,我发布并链接到IIS中的新虚拟目录.

我可能会使用设置为允许匿名用户"的访问规则来访问所有页面,但我也不会使用用户登录来访问受限页面.当我访问这些页面时,它会进入登录对话框,但是即使我输入了正确的用户名和密码,它也无法解决,并且错误页面显示为:

说明:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪,以获取有关错误及其在代码中起源的详细信息.

异常详细信息:System.Data.SqlClient.SqlException:尝试为文件C:\ Documents and Settings \ jasmin1 \ My Documents \ Visual Studio 2008 \ WebSites \ JASMIN \ App_Data \ aspnetdb.mdf附加自动命名数据库的尝试失败.存在具有相同名称的数据库,或者无法打开指定的文件,或者该数据库位于UNC共享上.

但是,当我尝试通过Visual Studio对其进行调试时,它可以正常工作.

请帮助...

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...

推荐答案

看看这些讨论:
讨论1 [ ^ ]
讨论2 [ ^ ]

如果需要,请尝试更多的
Have a look at these discussions:
Discussion 1[^]
Discussion 2[^]

In case needed, try for more here[^].


现在它可以在本地系统中正常工作,但是当我尝试从我办公室内LAN中的远程计算机访问此站点时,它是不可能的.请帮助.........

我尝试使用计算机名称和IP地址访问它.
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.


这篇关于在本地服务器上发布asp.net网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆