iis-7

Settings from system.webserver sometimes removed from web.config file

橙三吉。 提交于 2020-01-03 02:43:26
问题 We've come across a rather annoying bug in IIS7.5 where it occasionally removes the contents of the tag in the web.config. It doesn't just remove the contents at runtime, it actually physically updates the file. On our local machines it happens when we rebuild everything (which includes replacing application.config from source control) and on our server machines it happens on app pool restart. Both cases are intermittent. It seems to be happening because we have some config at the root of the

ASP.Net MVC DllImport BadImageFormatException 32bit/64bit

大城市里の小女人 提交于 2020-01-03 00:54:11
问题 I have the below code which is throwing a BadImageFormatException . The DLL it's loading is 32bit. The web server is running Windows 64bit but the application pool is set to Enable 32 bit. Is there any way I can get this to work? public class HomeController : Controller { [DllImport("CDCrypt.dll")] [return: MarshalAs(UnmanagedType.LPStr)] public static extern String Encrypt ([MarshalAs(UnmanagedType.LPStr)] String aName); [DllImport("CDCrypt.dll")] [return: MarshalAs(UnmanagedType.LPStr)]

How can I overwrite/update a file that is currently being served by IIS?

天涯浪子 提交于 2020-01-02 19:11:24
问题 The problem: My company puts out a monthly newsletter which I host on our internal website. I have a page for the author of the newsletter to upload the latest version. Once the author has uploaded the latest newsletter, he sends a broadcast email to announce the new newsletter. Employees invariably check the new newsletter and send feedback to the author with corrections that need to be made. Once the author has made the necessary corrections (typically within an hour of sending the

How to diagnose an internal server error (HTTP 500) from a PHP page in IIS 7.5

感情迁移 提交于 2020-01-02 18:55:54
问题 I am trying to get a trial copy of the aMember membership management system running on my local dev machine, which is Windows 7 64-bit with IIS 7.5. I have MySQL 5.5.10 and PHP 5.3.6, the latter which I installed using the Windows installer package. It seems fine. The aMember package has a tester.php script which I ran, and it gave an 'OK' result, despite its output being full of error messages related to Function eregi() is deprecated . I then ran the setup.php script, which seemed to run

IIS, Asp.NET pipeline and concurrency

二次信任 提交于 2020-01-02 10:06:09
问题 I'm wondering how the concurrency in a web application actually works. Ive read several articles and to my understanding multiple instances of HttpApplication would be working at the same time. Now, I created a simple web app to test concurrency and put the following to global.asax: protected void Application_BeginRequest(object sender, EventArgs e) { Response.Write("Request started: " + DateTime.Now); System.Threading.Thread.Sleep(10000); Response.Write("<br />"); Response.Write("Request

Split regular expression into 2 capture groups

杀马特。学长 韩版系。学妹 提交于 2020-01-02 08:43:21
问题 Ok, my previous questions were answered ... I have one more, this one is more difficult for me... ^([A-Za-z]+\.[A-Za-z0-9_-]+\.domain\.com)$ Right now this expression produces only 1 capture group as noted with ^() ; How would I do 2 capture groups for this URL? (for IIS regular expression rewrite) 回答1: You can do this by enclosing the relevant portions like so: text = "city.state.domain.com" pattern = "^([^\.]+).([^\.]+).([^\.]+).([^\.]+)$" match = re.match(pattern, text) match.groups() #

Process.Start permissions - doesn't get executed on iis7 server

天大地大妈咪最大 提交于 2020-01-02 08:02:25
问题 I have a website (asp.net mvc) that uses asp.net impersonation, i imperonsate an administrator user using the web.config element: I try to execute a process through Process.start (i tried to start a .bat file). I enabled interaction with desktop for iis admin service. I get no error, but nothing is really done. when i execute the .bat file locally- ot works perfectly. 回答1: Sounds to me like you have a UAC problem try turning it off as a first stop... http://www.petri.co.il/disable_uac_in

Process.Start permissions - doesn't get executed on iis7 server

纵然是瞬间 提交于 2020-01-02 08:01:32
问题 I have a website (asp.net mvc) that uses asp.net impersonation, i imperonsate an administrator user using the web.config element: I try to execute a process through Process.start (i tried to start a .bat file). I enabled interaction with desktop for iis admin service. I get no error, but nothing is really done. when i execute the .bat file locally- ot works perfectly. 回答1: Sounds to me like you have a UAC problem try turning it off as a first stop... http://www.petri.co.il/disable_uac_in

Virtual Database in Memory

烈酒焚心 提交于 2020-01-02 07:10:13
问题 Imagine the following: I have a table of 57,000 items that i regularly use in my application to figure out things like targeting groups etc. instead of querying the database 300,000 times a day, for a table that hardly ever changes it's data, is there a way to store its information in my application and poll data in memory directly? Or, do I have to create some sort of custom datatype for each row and iterate through testing each row, to check for the results i want? After some googling, the

Moving <httpredirect> out of web.config in separate config file

人盡茶涼 提交于 2020-01-02 05:47:06
问题 We have many (more than 100) redirects in our web.config like <configuration> <system.webServer> <httpRedirect enabled="true" exactDestination="true" httpResponseStatus="Found"> <add wildcard="/a" destination="/a/dfdf/default.htm" /> <add wildcard="/sad" destination="/aasd/dfdf/defsadault.htm" /> <add wildcard="/asdsaa" destination="/aasdas/dfasddf/default.htm" /> <add wildcard="/aasdsa" destination="/asdsaa/dfdf/defsdault.htm" /> <add wildcard="/aasd" destination="/adsa/dfdf/default.htm" />