I was trying to add some configuration in web.config file after the web page is started up. Such as:
But when I deploy it to the IIS, there of course has an authority issue to modify the web.config file. So I need add everyone permission to this application in IIS.
My question is: could any one give me a clue that I can add this configuration in runtime without the everyone permission? Such as adding this configuration to memory?
Thanks,
I just have a workaround to register the httphandler to web.config in the OnPreRender life-circle and it works fine; but the bad thing is that when we deploy it, we need give it a higher privilege. If you have better idea, please share it.
Related
I've setup a UNC share for IIS shared config using a specific AD service account and set to FULL CONTROL. I've also exported the config from one IIS server and set-up an additional IIS server to point to the share. When I open the applicationhost.config for example on the UNC share and remove an application pool, I can see the entry also remove in both IIS servers.
So I know:
1) I can export to the share with the specific service account
2) Both IIS servers can read the config when I edit manually
3) However when I remove an app pool from one of the IIS servers through the manager I get the above error.
I've tried using the process monitor utility to see what account is being used to write to the config and it seems it is my own AD user account rather than the shared service account. I know IIS Manager has my username e.g. ROOT\MYNAME logged on, but I wouldn't have thought it would use this to write changes to the shared config. Surely it would use the service account?
Does anyone know how to prevent this error? Why does the shared config and tied service account not come into play when making changes on one of the servers?
So, IMHO, this error is a red herring. I was publishing to a server and got a message saying I was out of space. So, I logged in, realized there was a bit of cruft in extra apps published in IIS, we didn't need. I right clicked and tried to remove one. I got the same error as you.
Having done some manual changes to applicationHost, I thought it "might be me" but it seemed very odd that editing this file would cause such a thing. However, I had recently learned that windows does some funky 32 vs 64bit machinations with this file (google it).
Deciding I had better things to do, I asked our IT to add space to the VM and guess what? I am no able to remove these apps. My guess is that I was at the end of the line on space and the backend management of these special files was not completing and throwing this not-so-helpful exception.
I'm not a 100% about this. For full disclosure, I will add that updates had been applied recently, but I'm pretty confident that this is a possible solution.
I'm in my way to convert an existing web site to Azure Cloud Service Project, but when I add this cloud project and debug my the project, the web page is missing all the styling, i.e. all the tabs in one page. I have seen that doesn't take the .css
Someone could tell me what's happening here?
Thanks!
Verify the *.css files, you need to make sure that the Build Action is set to Content:
You can try changing the properties of the cloud project -> Web -> use IIS Web Server..
worked for me
I had the same problem and I found it came from my use of IIS Express.
The problem was an error that can be seen in Windows Application Logs:
Src: IIS Express
"The directory specified for caching compressed content [...] is invalid. Static compression is being disabled."
fist I don't know if I have to write this as answer, if not sorry, I'll correct it.
About my question, I tough in publish it to Azure and when i did it, was working correctly. What I still don't know is why when I debug in VS with the cloud project is missing style and images.
I am trying to use Enterprise Web Library with Windows Azure. It appears that the web.config file for the EWL project works fine locally, but when I deploy to Azure the application cannot initialize. After logging in and viewing the site locally on Azure, it appears there are several web.config elements EWL requires that are locked on Azure. I've had to edit the following in order to have the application initialize on Azure:
Remove <serverRuntime uploadReadAheadSize="8388608" />.
Remove everything nested inside of the modules element.
The application seems to run fine on Azure after removing these parts.
The Web.config elements you removed are important to ensure that EWL works properly: uploadReadAheadSize fixes a problem with client certificate authentication, and using <clear/> in the <modules> section makes the behavior of EWL applications consistent across different servers by keeping the same set of modules in the pipeline regardless of what IIS features are installed on the machine.
There has to be a way to unlock these config sections in an Azure web role. Assuming they are locked in the web role's applicationHost.config file, maybe you can modify this file using a startup script as described in this answer: https://stackoverflow.com/a/10140024/35349.
I am not very familiar with Enterprise Library. If William’s suggestions do not help, please check your web.config to see if you’re missing any configuration sections. On your local machine, when you install Enterprise Library, it may modify machine.config to add certain configurations. But they may not exist in the cloud. So please search your local machine.config to see if there’re any Enterprise Library specific sections, and then add them to your web.config.
Best Regards,
Ming Xu.
I have a new Orchard site which successfully runs the setup and database configuration when running locally. But when I tried to deploy it to the actual server and point a browser to the site, I get a "Directory Listing Denied" error.
Anyone seen this and fixed it?
I figured it out. Running on a shared web server, if IIS is configured for my site to use the default app pool, Orchard is precluded from reading its own files. (Remember that Orchard uses libraries and needs deep read/write access to subdirectories).
So the solution was simply to configure the site to run in its own isolated application pool.
Looks like this on my site's control panel:
Hope this solution helps someone down the line.
My guess is that you deployed the whole source code instead of src/orchard.web.
I am configuring the Kentico CMS to my local machine but getting the following error:
The CISM115\cis account is not granted with Modify permission on folder C:\inetpub\wwwroot\KenticoCMS\. Although this is not an error, it's highly recommended that you configure these permissions.
Why is this happening and how do I fix it?
You need to change the persissions of that folder, so that the application can modify it's contents.