iis-7

IIS configuration: Navigation to the webpage was canceled when converting page to PDF using SautinSoft.PdfVision

☆樱花仙子☆ 提交于 2019-12-24 09:11:59
问题 I am having a problem when trying to convert an ASP .Net page to PDF using SautinSoft.PdfVision. Using this library is quite straight forward, all you need to do is tho provide the URL of the page you want to convert and the PDF destination path. SautinSoft.PdfVision v = new SautinSoft.PdfVision(); v.ConvertHtmlFileToPDFFile(url, pdfFilePath); Instead of having the page I ask for to be rendered as PDF, I always get the one saying "Navigation to the webpage was canceled", as if IIS (version 7

Running an OS command using apache-ant to IIS config

China☆狼群 提交于 2019-12-24 08:58:21
问题 I'm trying to create an ANT script which amongst other things will configure IIS. To do this, trying to harness the appcmd tool. However getting a strange error. The appcmd command runs fine outside of the ant script, but fails within. I'm using the exec task to kick it all off : <exec dir="C:\\Windows\\System32\\inetsrv\\" executable="C:\\Windows\\System32\\inetsrv\\appcmd.exe" output="d:\out.txt"> <arg value="appcmd set config /section:isapiCgiRestriction /+" [path='${appian_home}\\jakarta\

Visual Studio changes local IIS configuration

眉间皱痕 提交于 2019-12-24 08:32:41
问题 I have my website hosted on a IIS locally. My project has different branches in TFS, and whenever I open a project in Visual Studio, it automagically changes the IIS website physical path to the project being opened. Is it possible to prevent Visual Studio from automatically changing the physical path in IIS? (I only wish to change it manually from the IIS GUI). 来源: https://stackoverflow.com/questions/39763835/visual-studio-changes-local-iis-configuration

Do we really need to restart IIS 7 application pool? Do the same practice apply to other web servers?

非 Y 不嫁゛ 提交于 2019-12-24 08:25:20
问题 I am just wondering why is restarting IIS 7 application pool consider a good practice? I know that it'll clean up orphan resources like threads or session state, but how does other web server deal with this kind of problem? Do java developer/admin have to restart weblogic/websphere/apache/tomcat every so often to clean up junk in memory? 回答1: Typically it's used to compensate for bad programming. Sometimes yours, sometimes third parties depending on the libraries you are using. And, as with

Set website port with ServerManager class

℡╲_俬逩灬. 提交于 2019-12-24 07:49:26
问题 I need help setting a port for a website using the Microsoft.Web.Administration.ServerManager class. First I get the website: Site site = this._serverManager.Sites[section.WebsiteName]; Then I try to set the port from my settings I passed in: foreach (Binding b in from binding in site.Bindings.Where(b => b != null && b.EndPoint != null) select binding) { b.EndPoint.Port = Int32.Parse(section.Port); Console.WriteLine(b.EndPoint.Port); } this._serverManager.CommitChanges(); I put the writeline

ASP.NET Authorization inherits rules

无人久伴 提交于 2019-12-24 07:13:04
问题 I am trying to protect a (sub)directory in my ASP.NET website that contains files (Videos, documents etc.) So I created a Web.config file: <?xml version="1.0"?> <configuration> <system.web> <authorization> <deny users="?"/> <allow roles="Administrator"/> <allow roles="Author"/> <allow roles="Report"/> </authorization> </system.web> </configuration> These roles correspond with those defined in the asp.net roles table in my database. I opened up IIS7 to check if the authorization rules were

IIS7 downloading file length

孤街醉人 提交于 2019-12-24 06:58:31
问题 I've following code for file download: FileInfo fileInfo = new FileInfo(filePath); context.Response.Clear(); context.Response.ContentType = "application/octet-stream"; context.Response.AddHeader("Content-Disposition", "attachment; filename=" + System.IO.Path.GetFileName(filePath)); context.Response.AddHeader("Content-Length", fileInfo.Length.ToString()); context.Response.WriteFile(filePath); context.Response.End(); When I run it on my local IIS6 it works fine. Web browser (tested on IE8,

How to protect static content on IIS7 in Classic Mode?

女生的网名这么多〃 提交于 2019-12-24 06:34:09
问题 I know how to protect my static (HTML) pages in IIS6, and how to do it using the IIS7 Integrated Pipeline, but how can I protect my HTML pages from unauthorised access in IIS7 when running in Classic Mode? It's an ASP.NET site using forms authentication. 回答1: ASP.NET forms authentication has nothing to do with resources that aren't handled by ASP.NET, like HTML files. Two options: 1) Tell ASP.NET to handle the static file types you are concerned with (HTML, etc) 2) Disable anonymous access

Download server with ASP.NET how to accomplish long running synchronous requests?

只愿长相守 提交于 2019-12-24 05:46:07
问题 My ASP.NET application is a download application (no pages) which reads huge binary files (1-2 GB -> over 1 hours download time with resume support) from local network and stream them to web clients (each request -> one large binary response, so there's no text/html response at all). I use a HTTP Handler (.ashx) instead of a (.aspx) page for processing requests. Using a shared buffer and producer-consumer pattern main thread (from ASP.NET thread pool) creates another thread and together they

405 - HTTP verb used to access this page is not allowed

时光毁灭记忆、已成空白 提交于 2019-12-24 05:33:41
问题 I have developed a site in ASP.NET 3.5 I had deployed it on Windows server 2008 and iis7. I was using evaluation version of Windows server 2008. Day before yesterday the evalution period expired and I formatted my machine and re-installed the Windows server 2008. Now, when I deploy the site on IIS7 and try to access it then I get following error, 405 - HTTP verb used to access this page is not allowed. The page you are looking for cannot be displayed because an invalid method (HTTP verb) was