Tag: iis

编码Url后出现HTTP 404错误

当我使用HttpUtility.UrlEncode对Url进行编码时,我最终收到服务器错误。 ASP.Net代码: NavigateUrl= url: http://localhost/UITest/MM/UpdateMember.aspx%3fgroupId%3d0032409901 导致“HTTP错误404.0 – 未找到您正在查找的资源已被删除,其名称已更改,或暂时不可用”。 但是使用: NavigateUrl= 结果在Url中: http://localhost/UITest/MM/UpdateMember.aspx?groupId=0032409901 这很好。 我做错了什么吗?

在IIS服务下使用COM将PowerPoint渲染到C#中时出现问题

首先,我的程序可以渲染pptx到png,在Windows Server 2008 R2上渲染时质量大大降低,我想知道为什么。 我使用Cassini在Windows 7 x64上测试了我的程序,并且ppt的png渲染是完美的。 但是当我在IIS上部署我的程序并尝试渲染pptx时,其渲染质量会降低。 这是链接相同的图像,一个在Windows 7 cassini下呈现,另一个在windows server 2008下呈现。 完美品质: http : //dl.dropbox.com/u/2458800/exemple-high-quality.png 低质量的: http : //dl.dropbox.com/u/2458800/exemple-low-quality.png 它似乎是某种抗锯齿问题。 最后,这是我的代码: var powerPoint = new Application(); var presentation = powerPoint.Presentations.Open(sourceFile, MsoTriState.msoFalse, MsoTriState.msoTriStateMixed, MsoTriState.msoFalse); presentation.Export(destinationDir, “png”, 960, 720); presentation.Close(); powerPoint.Quit(); 编辑: 嗯,我知道使用PowerPoint COM会在服务器上出现问题。 试过Aspose,解决了这个问题。

Session Sql数据库关闭时如何重定向到ASP.NET错误页面

我有一个ASP.NET网站,它在SQL Server中存储会话。 我故意使我的会话数据库脱机,以确保我的错误页面显示给用户。 我的Web.config: 我的global.asax: protected void Application_Error(object sender, EventArgs e) { Exception exception = Server.GetLastError(); Response.Clear(); Server.ClearError(); Response.Redirect(“Error.aspx”); } 我的Error.aspx页面是一个只有本地化字符串的简单页面。 因此,将无法使其成为html页面。 我继续收到此错误: “底层提供商在Open上失败了。” 你可能会说这个错误的堆栈溢出有很多解决方案,但我的问题是显示错误页面(会话数据库关闭时的aspx页面)而不是解决此错误。 即使我直接导航到error.aspx页面,我也会收到此错误。 我需要一种方法告诉Asp.Net和IIS,我不需要这个特定页面的会话信息。 如何解决此问题并确保显示我的错误页面。

ASP.NET mvc auth或会话比设置更快到期

在我的ASP.NET MVC5 网站中,web.config中的登录和会话超时如下: 会话或身份validation仍然在五分钟内完成。 我已经接近我的网络托管服务,以增加IIS的超时,他们在增加IIS的超时后共享了一个屏幕截图 ,但没有任何改变。 知道为什么会这样。

ASP.NET MVC5未针对请求的URL配置Web服务器,并且未在服务器上启用目录浏览

我有一个从MVC5应用程序加载页面的问题。 我安装并使用了这个软件: Windows 10 Visual Studio Enterprise 2015 Microsoft IIS 10.0 Express 带有entity framework的MVC 5 到现在为止一切正常,我能够显示网站。 在创建模型之后,使用entity framework的控制器之后我收到了此错误消息。 HTTP Error 403.14 – Forbidden The Web server is configured to not list the contents of this directory. Most likely causes: A default document is not configured for the requested URL, and directory browsing is not enabled […]

OracleException(0x80004005)连接到Oracle数据库时

我开发了一个简单的C#,。net 4.0网站,我想将其部署到IIS测试服务器上。 我正在使用Oracle.DataAccess程序集连接到Oracle数据库,并且我添加了该DLL(以及许多其他相关DLL的地狱,只是为了好的措施并且在shotfun尝试尝试解决这个问题) ,到我网站的bin文件夹。 它在我的开发机器上工作正常(显然;在复制所有这些DLL之前工作正常),但不是我的测试服务器。 在测试服务器上,我收到以下exception: [OracleException (0x80004005)] Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck) +1468 Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src) +24 Oracle.DataAccess.Client.OracleConnection.Open() +4391 MappingQueries.connect() +173 scripts_list_mappings.Page_Load(Object sender, EventArgs e) +17 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 […]

未调用AssemblyResolve,并且在序列化期间抛出FileNotFoundException

在我的ASP.NET应用程序中,有MyAssembly.CustomIdentity类,.NET运行时尝试序列化该类 。 在序列化期间,它抛出FileNotFoundException抱怨它无法加载MyAssembly 。 [SerializationException: Unable to find assembly ‘MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’.] System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +9464367 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +345 System.AppDomain.get_Id() +0 .DoCallBackInDefaultDomain(IntPtr function, Void* cookie) +151 .DefaultDomain.Initialize() +30 .LanguageSupport.InitializeDefaultAppDomain(LanguageSupport* ) +41 .LanguageSupport._Initialize(LanguageSupport* ) +391 .LanguageSupport.Initialize(LanguageSupport* ) +65 [ModuleLoadException: The C++ module failed to load while attempting to initialize the default appdomain.] […]

在IIS上尝试我的WCF数据服务时得到“401 – 未经授权”

我开发了一个运行良好的WCF数据服务,我可以完成我想要的每个操作。 我开发了一个小型的c#客户端来测试所有function:添加,删除,修改,检索数据。 在我的visual studio服务器上一切正常,但是一旦我在IIS服务器上: 我可以添加/检索数据 我无法编辑数据 当我尝试编辑数据时,我收到此错误: System.Data.Services.Client.DataServiceRequestException未处理 消息= Une erreur s’est produite lors du traitement decetterequête。 来源= System.Data.Services.Client 堆栈跟踪: àSystem.Data.Services.Client.DataServiceContext.SaveResult.HandleBatchResponse() àSystem.Data.Services.Client.DataServiceContext.SaveResult.EndRequest() àSystem.Data.Services.Client.DataServiceContext.SaveChanges(SaveChangesOptions选项) àSystem.Data.Services.Client.DataServiceContext.SaveChanges() àWSTester.Program.ModifySomeThings(实体实体)dans D:\ Workspace \ 10067.GfK Telecontrol.TOM \ Release \ V3.1 \ WSTester \ Program.cs:ligne 90 àWSTester.Program.Main(String [] args)dans D:\ Workspace \ 10067.GfK Telecontrol.TOM \ Release \ V3.1 \ WSTester \ Program.cs:ligne […]

添加自定义请求标头适用于IIS 7.0但不适用于Asp.net开发服务器

我们正在跟踪请求响应所需的总时间。 我们使用global.asax.cs的Application_AcquireRequestState中的请求的唯一键实现了添加的自定义头: request.headers.add(“reqKey”,key) 。 当针对该请求命中Application_PostRequestHandlerExecute时,它会将带有唯一键的自定义标头拉回,并使用该记录记录总响应时间。 还记录了许多其他内容,例如用户名,表单数据等,而不仅仅是简单的计时。 当代码在IIS 7.5上运行时,这当前工作正常。 但是,当它在ASP.Net开发服务器上运行时,它会抛出Operation is not supported on this platformexceptionOperation is not supported on this platform的Operation is not supported on this platform 。 我们的产品是IIS 7,那么我该如何解决这个错误呢?

Azure Web应用程序中的“无法创建SSL / TLS安全通道”

我的Azure Web应用程序需要连接到各种服务器(使用和不使用SSL)。 只要我在Windows 10上的本地IIS Express或IIS 7.5中运行应用程序,这就完美无缺。 一旦我将应用程序部署到Azure,它就会停止为需要SSL的某些服务器工作(不是全部)。 如果我通过ssllabs运行它们通常会得到一个A,而那些工作得到一个B或一个C. 所以我假设Azure实例上的.NET支持的密码少于本地支持的密码或类似的东西? 我试过这个 ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3; 也试过没有任何TLS标志,因为这是大多数人的建议,但它没有帮助。 根据下面的post,10月有一个修复,但现在是12月。 https://social.msdn.microsoft.com/Forums/en-US/ca6372be-3169-4fb5-870f-bfbea605faf6/azure-webapp-webjob-exception-could-not-create-ssltls-secure-channel?forum= windowsazurewebsitespreview 它也与Cloud Flare无关。 有任何想法吗? 或者也许要开始,我如何看到我的应用程序尝试使用的密码和可用的密码?