运行Web项目时出错 [英] error while running web project

查看:67
本文介绍了运行Web项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行Web项目时出现错误
我将我的网站地址写在浏览器中,如下所示:
http://localhost/my_vd/test_777/WebApplication1/WebApplication1/Default.aspx

my_vd是虚拟目录的别名.并且我不发布项目(因为我不知道如何发布VS2010 –我不知道如何填写服务URL和站点/应用程序)
但是它要求输入用户名和密码.为什么?
我禁用了此选项(菜单:工具->文件夹选项->视图->使用简单文件共享)
因此需要解决的问题
但我收到此错误:

源错误:

第44行:ASP.NET,用于识别传入的用户.
第45行:->
第46行:< authentication mode ="form"/>
第47行:<!-
第48行:< customErrors>部分启用配置

源文件:C:\ my_virtual_directory \ test_777 \ webapplication1 \ webapplication1 \ web.config行:46 



[edit]粗体替换为代码块-OriginalGriff [/edit]

解决方案

这与服务器上的文件权限/文件共享无关,而与ASP的身份验证有关.NET框架要求Web客户端向运行您的ASP.NET站点的IIS Web服务器发出HTTP请求.

请参阅 http://msdn.microsoft.com/en-us/library/532aee0e.aspx [ ^ ]有关身份验证模式的详细信息可用.

这是关于< authentication>的内容. web.config文件的第46行(应该位于web.config的< configuration>< system.web>部分)中的年份.

如果您不想获取ASP.NET用户/密码表单,则可能需要以下两者之一:

Windows身份验证-在这种情况下,ASP.NET将使用IIS管理控制台中指定的任何身份验证方法(如果有),包括在适当的情况下允许匿名访问,或者
无-完全按照它说的去做(让您自由地在自己的代码中为自己做任何事情)

error when run web project
I write the address of my web site in browser as below:
http://localhost/my_vd/test_777/WebApplication1/WebApplication1/Default.aspx

my_vd is aliace of virtual directory . and I don’t publish my project (because I don’t know how can I publish I VS2010 – I don’t know how must I fill box service URL and site/application)
but it ask for username and password . why?
I disabled this option (Menu : tools -> folder option -> view -> use simple file sharing)
Therefore problems be solved
But I received this error :

Source Error:

Line 44:             ASP.NET to identify an incoming user.
Line 45:         -->
Line 46:         <authentication mode="form" />
Line 47:         <!--
Line 48:             The <customErrors> section enables configuration

Source File: C:\my_virtual_directory\test_777\webapplication1\webapplication1\web.config    Line: 46



[edit]Bold replaced with code block - OriginalGriff[/edit]

解决方案

This is not about file permissions / file sharing on your server, but about what authentication the ASP.NET framework demands when a web client makes an HTTP request to the IIS web server running your ASP.NET site.

See http://msdn.microsoft.com/en-us/library/532aee0e.aspx[^] for details of the authentication modes available.

This is about the <authentication> tage in line 46 of your web.config file (which should be in the <configuration><system.web> section of the web.config).

If you don''t want to get the ASP.NET user / password form, you probably want either:

Windows authentication - in which case ASP.NET will use whatever authentication method (if any) is specified in your IIS management console, including allowing anonymous access if appropriate, or
None - which does exactly what it says (and leaves you free to do whatever you want for yourself in your own code)


这篇关于运行Web项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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