在IIS中托管网站的问题 [英] hosting the website in IIS problem
问题描述
大家好,
我正在使用asp.net,C#,VS 2005和sql server 2005
我已经为我的网络项目创建了一个安装文件...
我还在PC上安装了IIS..
我的数据库(.mdf)文件位于App_Data文件夹中
我现在已经安装了我的项目...
我的web.config包含以下连接字符串:
Hi All,
I am using asp.net,C#,VS 2005,and sql server 2005
I have created a setup file for my web project...
I have also installed IIS in my PC..
my database (.mdf) file is in App_Data folder
I have installed my project now ...
my web.config contains the following connection string:
<connectionStrings>
<add name="conStr" connectionString="Trusted_Connection=true;pwd=;Initial Catalog=CLINICAL;Data Source=(local)" providerName="System.Data.SqlClient"/>
</connectionStrings>
但是当我键入http://localhost/WebSetup1/Firstpage.aspx
它将显示一个页面..
但是,当我单击包含与数据库的连接的页面时,它不会显示或执行..
它会向KARAN \ ASPNET发出错误消息,如登录失败".
但是,如果我从Visual Studio运行,则完全没有问题..它工作正常..
我已经在我的PC中安装了sql server.
简而言之:未建立数据库连接..或未从数据库中获取数据..
请帮我....
在此先感谢.
问候
karan
But when i type http://localhost/WebSetup1/Firstpage.aspx
It will display a page..
But when i click on page that contains connection with the database it is not shown or executed..
It will give error message like Login Failed to KARAN\ASPNET..
but if i run from Visual studio no problem at all..Its working properly..
I have installed sql server in my pC.
In short : database connection is not established.. or data is not fetched from the database..
Please help me ....
Thanks in Advance.
regards
karan
推荐答案
最有可能是权限不正确.这将帮助 [
It''s most likely that the permissions are incorrect. This will help[^] to get you started.
更多关于数字人的答案,您可以使用带有SQL用户凭据的不同连接字符串,或授予ASPNET用户数据库所需的权限.
http://www.dnzone.com/go?503 [
More to digital man''s answer, you can use different connection string with SQL user credentials, or give ASPNET user required rights on you database.
http://www.dnzone.com/go?503[^]
是在安装VS.Net之前还是之后安装IIS?在安装之后,就会产生类似的问题.
Are you install IIS before install VS.Net or after that?If you install after that then it create problem like that.
这篇关于在IIS中托管网站的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!