GVKun编程网logo

Asp.Net Coer 解决无法连接到Web 服务器“IIS Express”报错(无法连接到asp.netdevelopmentserver)

12

关于Asp.NetCoer解决无法连接到Web服务器“IISExpress”报错和无法连接到asp.netdevelopmentserver的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于

关于Asp.Net Coer 解决无法连接到Web 服务器“IIS Express”报错无法连接到asp.netdevelopmentserver的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于ASP.NET dev服务器和IIS Express有什么区别?、ASP.Net WebApi 项目,挂载到IIS Express和IIS中是,请求速度差异较大、asp.net – Http Handler正在iis express中工作,而不是在iis服务器上工作、asp.net – IIS Express(WebMatrix)打开外部连接等相关知识的信息别忘了在本站进行查找喔。

本文目录一览:

Asp.Net Coer 解决无法连接到Web 服务器“IIS Express”报错(无法连接到asp.netdevelopmentserver)

Asp.Net Coer 解决无法连接到Web 服务器“IIS Express”报错(无法连接到asp.netdevelopmentserver)

错误信息如图:

 

 

 解决方案:

找到项目目录下的.vs文件夹删除,重新打开程序即可

 

ASP.NET dev服务器和IIS Express有什么区别?

ASP.NET dev服务器和IIS Express有什么区别?

Visual Studio SP1具有从Visual Studio而不是VS开发服务器运行Webmatrix又称“IIS Express”的功能。

两者有什么区别? [VS开发服务器或IIS express]。

这个话题有什么新的和有趣的吗?

解决方法

看看Scott Guthrie的这篇文章: Introducing IIS Express

We think it combines the ease of use of the ASP.NET Web Server with the full power of IIS. Specifically:

  • It’s lightweight and easy to install (less than 10Mb download and a super quick install)
  • It does not require an administrator account to run/debug applications from Visual Studio
  • It enables a full web-server feature set – including SSL,URL Rewrite,Media Support,and all other IIS 7.x modules
  • It supports and enables the same extensibility model and web.config file settings that IIS 7.x support
  • It can be installed side-by-side with the full IIS web server as well as the ASP.NET Development Server (they do not conflict at all)
  • It works on Windows XP and higher operating systems – giving you a full IIS 7.x developer feature-set on all OS platforms

ASP.Net WebApi 项目,挂载到IIS Express和IIS中是,请求速度差异较大

ASP.Net WebApi 项目,挂载到IIS Express和IIS中是,请求速度差异较大

同样的一个WebApi接口,调试时,选择本地IIS服务器运行(10s+),与选择IIS Express服务器运行的请求时间差异较大(3s+),有大神知道怎么解决吗,或者原因是什么吗?

asp.net – Http Handler正在iis express中工作,而不是在iis服务器上工作

asp.net – Http Handler正在iis express中工作,而不是在iis服务器上工作

我将实现HttpHandler,以允许基于会话值从我的站点下载文件.如果会话存在,则允许用户下载文件,否则重定向到索引页面,该页面是站点的登录页面.当我在IIS服务器上运行我的网站时,我的代码在iis express中工作正常,处理程序无法运行.

对于IIS express,web.config文件包含我已添加的以下部分.以下配置适用于iis express.

<system.web>

<httpHandlers>

  <add verb="*" path="*.pdf" type="QDMS.FileHandler" />
Same add tag for all the files to restrict downloading without session.

</httpHandlers>

</system.web>

IIS服务器的配置不起作用如下.

<system.webServer>

<handlers>
  <add name="Files" path="*.pdf,*.doc,*.docx,*.rar,*.zip,*.ppt,*.pptx,*.jpg,*.png,*.bmp,*.gif,*.html,*.htm,*.pps" verb="*" type="QDMS.FileHandler" resourceType="Unspecified" requireAccess="script" />    
</handlers>

</system.webServer>

我的文件处理程序如下

using System;
using System.Web;
using System.Web.SessionState;
using QDMS.Old_App_Code;

namespace QDMS
{
public class FileHandler : IHttpHandler,IReadOnlySessionState
{
public bool IsReusable
{
get { return true; }
}
public void ProcessRequest(HttpContext context)
{
if (!CheckWetherTheRequestForFileExistOrNot(context)) return;
if (CheckUsersForFileDownloading(context))
context.Response.Redirect("~/index.aspx");
else
{
var rawURL = context.Request.RawUrl;
var dotIndex = rawURL.LastIndexOf(".",System.StringComparison.Ordinal);
var ext = rawURL.Substring(dotIndex);
context.Response.ClearContent();
context.Response.ClearHeaders();
context.Response.ContentType = MIMEEType.Get(ext);
context.response.addheader("Content-disposition","attachment");
context.Response.WriteFile(rawURL);
context.Response.Flush();
}  
}
public bool CheckWetherTheRequestForFileExistOrNot(HttpContext context)
{
string url = context.Request.RawUrl.ToLower().Trim();
if (url.Contains(".pdf") || url.Contains(".xls") || url.Contains(".xlsx") || url.Contains(".jpg") ||
            url.Contains(".bmp") || url.Contains(".rar") || url.Contains(".doc") || url.Contains(".docx") ||
            url.Contains(".png") || url.Contains(".gif") || url.Contains(".pptx") || url.Contains(".zip") ||
            url.Contains(".ppt") || url.Contains(".pps") || url.Contains(".htm") || url.Contains(".html"))
return true;
else
return false;
}
public bool CheckUsersForFileDownloading(HttpContext context)
{
return (context.Session["FrontHiddenID"] == null) && (context.Session["HiddenID"] == null);
}
}
}

我确信在web.config文件中的部分不正确,这就是它无法正常工作的原因.所以我需要建议来纠正web.config文件中的处理程序部分.
任何有关此问题的建议和帮助将受到高度赞赏

解决方法

您的IIS处理程序应如下所示:

<add name="Files" path="*.pdf" verb="*" type="QDMS.FileHandler" resourceType="Unspecified" requireAccess="Script" />

与您的版本有两点不同:

>只有一个文件掩码,您应该为每种文件类型注册一个处理程序
> requireAccess =“脚本”,“脚本”具有大写“S”

希望这会有所帮助

asp.net – IIS Express(WebMatrix)打开外部连接

asp.net – IIS Express(WebMatrix)打开外部连接

我已经在端口80和2012上启用了IIS Express(HTTP流量输入)和IIS Express(HTTPS流量输入)的防火墙规则(这一个在WebMatrix中使用),但是我无法从LAN连接到服务器. WebMatrix在虚拟 Windows 7机器上运行.

这是IIS Express的限制吗?>是 – 您可以使用应用程序重新分发IIS Express.没有连接限制.
ScottGu’s blog

解决方法

尽管它需要一些努力,但是在这个 here上有一个很棒的博文,Vaidy在CodeCast播客 here上谈到了IIS Developer Express.

关于Asp.Net Coer 解决无法连接到Web 服务器“IIS Express”报错无法连接到asp.netdevelopmentserver的介绍现已完结,谢谢您的耐心阅读,如果想了解更多关于ASP.NET dev服务器和IIS Express有什么区别?、ASP.Net WebApi 项目,挂载到IIS Express和IIS中是,请求速度差异较大、asp.net – Http Handler正在iis express中工作,而不是在iis服务器上工作、asp.net – IIS Express(WebMatrix)打开外部连接的相关知识,请在本站寻找。

本文标签: