iis-7

IIS7 Cache-Control

旧街凉风 提交于 2019-12-27 10:42:48
问题 I'm trying to do something which I thought would be fairly simple. Get IIS 7 to tell clients they can cache all images on my site for a certain amount of time, let's say 24 hours. I have tried the step on http://www.galcho.com/Blog/post/2008/02/27/IIS7-How-to-set-cache-control-for-static-content.aspx but to no avail. I still get requests going to the server with 304s being returned. Does anyone have a way of doing this? I have a graphically intensive site and my users are being hammered (so

How to set the Default Page in ASP.NET?

若如初见. 提交于 2019-12-27 10:39:29
问题 Is there any section or code which allows us to set default page in web.config ? For example, when people first visit my website, I want them to see CreateThing.aspx rather than Default.aspx . The solutions I already know: Put this line of code => Response.Redirect("CreateThings.aspx") in Default.aspx Page_Load event but this method is really naive. We can use IIS (default page configuration,) but I wanna do the same thing over on my ASP.NET application. This could be another solution for now

How to set the Default Page in ASP.NET?

五迷三道 提交于 2019-12-27 10:37:15
问题 Is there any section or code which allows us to set default page in web.config ? For example, when people first visit my website, I want them to see CreateThing.aspx rather than Default.aspx . The solutions I already know: Put this line of code => Response.Redirect("CreateThings.aspx") in Default.aspx Page_Load event but this method is really naive. We can use IIS (default page configuration,) but I wanna do the same thing over on my ASP.NET application. This could be another solution for now

An Application which fetches IIS and App Pool details of website hosted in remote server

拜拜、爱过 提交于 2019-12-25 15:33:43
问题 I got a task of creating an Web application in C# ,which fetches IIS and App Pool details of Website hosted in the remote server(same location).Any idea or help is well appreciated!!! -Renji 回答1: This is somehow a broad question, but in order to help here are some points you can start from: get the website name at IIS: System.Web.Hosting.HostingEnvironment.ApplicationHost.GetSiteName() to get the list of websites and virtual dirs, check this: How to programmatically get sites list and virtual

mappageroute for mydomain/product to mydomain/products/product

风格不统一 提交于 2019-12-25 14:39:47
问题 At the moment Im getting a 404 error for any product page of the form mydomain/product I would like to map these to mydomain/showproduct.aspx?pagename=product Is it something like routes.MapPageRoute( "Product", "{Prodname}", "~/showproduct.aspx" ); Not sure if this will work and not sure about the querystring 回答1: That URL you would like to map looks more like a classic ASP.NET URL then an MVC URL. In MVC you are not linking to physical files but action methods in a controller class. In MVC

mappageroute for mydomain/product to mydomain/products/product

醉酒当歌 提交于 2019-12-25 14:39:06
问题 At the moment Im getting a 404 error for any product page of the form mydomain/product I would like to map these to mydomain/showproduct.aspx?pagename=product Is it something like routes.MapPageRoute( "Product", "{Prodname}", "~/showproduct.aspx" ); Not sure if this will work and not sure about the querystring 回答1: That URL you would like to map looks more like a classic ASP.NET URL then an MVC URL. In MVC you are not linking to physical files but action methods in a controller class. In MVC

getting Parser error for Asp.Net by IIS

我的梦境 提交于 2019-12-25 12:43:32
问题 I'm developing some Asp.Net website and I'm trying to run it on my IIS, I published the web (under build option) and put it under wwwroot, but I get this parser error below. shall I publish the web to add it in inetmgr? or just put the files in my project folder there? what's the point of publishing? Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file

appcmd code in C#?

余生长醉 提交于 2019-12-25 12:27:07
问题 I have an web service that run's this: var Proc = new Process(); Proc.StartInfo.FileName = CredentialBatFile; Proc.StartInfo.Arguments = WebSiteName + " " + Apppool_Username + " " + Apppool_Password; Proc.Start(); The bat file has: C:\Windows\system32\inetsrv\appcmd.exe set site "%1" -virtualDirectoryDefaults.userName:%2 -virtualDirectoryDefaults.password:%3 If I run on localhost (on the server) it works fine. however if I run it on the server from the web service it fails. Can I achieve the

Can I route HTTPS requests to HTTP application, using IIS7 ARR?

浪子不回头ぞ 提交于 2019-12-25 10:48:45
问题 I have an application server installed, listening for HTTP traffic on a port which is not blocked from the world by a firewall. I wish to expose the services offered by this application only through HTTPS, preferably as a "sub directory" of the HTTPS site already hosted by the server. Using IIS7 Url Rewriting (as part of the ARR package), I am able to setup a rule that redirects all traffic to a sub path of my existing HTTPS site. However, I am facing some trouble, when trying to make the