web-config

Is there a way to include an email address "display name" in the smtp element of a Web.config file?

I'm working on an EmailSender, and I'm grabbing the email address from my Web.config file. I'd like to also grab a "display name" for that email, from the same section if possible, but I'm not seeing an obvious way to do this. In my Web.config file, I have included a default "from email address", like this: <configuration> <system.ne...

How to configure static content cache per folder and extension in IIS7?

I would like to set up rules in IIS7 for static content caching in my ASP.NET website. I have seen these articles, which details how to do it using the <clientCache /> element in web.config: Client Cache <clientCache> (IIS.NET) Add Expires or Cache Control Header to static content in IIS (Stack Overflow) However, this setting ap...

Using ConfigurationManager to write to an external config file?

I've not been able to find any easy reference on this: I have a web.config file that specifies <appSettings file="someotherfile.config"/> to put settings in an external file. That means that someotherfile.config is not a "valid" configuration file, as it doesn't follow the full tree format, it just contains the appSettings subtree. Is ...

Override machine.config by web.config

I learn to work with the built-in profile provider of .Net, and have the following problem: I read that the machine.config-settings can be overridden by the web.config-settings of a .Net-Application. The following settings in the machine.config-file are relevant for me: <connectionStrings> <add name="LocalSqlServer" connectionString="D...

What happens when I save changes to web.config with a live app?

What happens when I save a change to web.config while the application is live? The reason I ask is that I'm working on a site/webapp right now which is built on top of an e-commerce platform. At seemingly random intervals, the site will stop responding. The process for the app pool is normal (no ridiculous memory or CPU usage when this h...

(401) Unauthorized error : WCF security/binding

I have a WCF web service, and a client both on the same machine. Accessing the WCF web service directly using the browser works, but the client can't connect; error message below. Any ideas? Integrated Windows Auth in IIS is used for both client and server. The remote server returned an error: (401) Unauthorized. Description: An unhan...

Configure IIS 7.0 to enable webservices in classic mode

What are the configuration file settings to enable webservices on IIS 7.0 in classic mode? The site has to be in a classic mode application pool because the Report Viewer controls crash when running in Integrated Mode. However in a classic mode application pool, webservices produce the following error message: The requested content a...

.Net Configuration files confusion

We've got a somewhat complex project that the original developers split into multiple projects for organization purposes. What this means to me is that I've got an ASP.Net site that has a web.config and contains all sorts of good settings, and another project that compiles to a DLL that has it's own .config file, app.config. In the DLL...

Entity Framework connection to SQLite database not working after deployment

I changed a dataset based approach to my sqlite database to one using the Entity Framework. I created the entities using Visual studio 2008's wizard and had the connection string stored in the app.config. A client program then communicates through WCF with the database. This works well on the development computer when I host the WCF serv...

Url routing and web.config of nested folder

I'm using URL routing (with WebForms) in the following format: http://host/project/{projectid}/{pageName} Another option is that the user is refering to a subapplication: http://host/project/{projectid}/{application}/{pageName} The subapplication isn't a new web application, simply a virtual directory. My subapplication does have...

XmlMassUpdate - How to delete a node

We would like to use msbuild to clear the connectionStrings section from a web.config file. What is the easiest way to do that? We have previously used XmlMassUpdate to replace values (see also this question: http://stackoverflow.com/questions/1294438/xmlmassupdate-replace-value-node), but have not found a way to remove it entirely. M...

Is my web.config file redirecting the /stats/ page?

I'm hosting an ASP.Net MVC site on GoDaddy. The site is in the root directory, and when I try to go to http://mydomain.com/stats, it redirects me to my MVC's logon page. I have no stats controller or view in my application, so it's not that it's hitting the wrong page. I contacted GoDaddy and they said it was most likely something i...

What is <location path="web.config"> for?

What is the meaning of: <location path="web.config"> With the following web.config file (located in the root of the web app) will doDynamicCompression be set to true or false? <configuration> <system.webServer> <urlCompression doDynamicCompression="true" /> </system.webServer> ... <location path="web.config"...

How do I implement page authorizaton in ASP.NET using a SQL store instead of web.config?

For instance, the way we're doing it now is like thus: (in the web.config) <location path="somePath"> <system.web> <authorization> <allow roles="approvedRoles"/> <deny users="*"/> </authorization> </system.web> </location> And what I would like to do instead is to store this information in SQL somewhere so that we can mani...

Why won't my VS 2005 hit the break points?

I'm going crazy and wasting a lot of time. I am running in DEBUG, checked the web.config to ensure debug=true is there, checked the code to ensure I am reaching it, cleared all temp files and pdb's. The only thing that works is to continually kill the solution, create a new solution and add all the projects again. I shouldn't have to do ...

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

Hi. I been strugling with this for 2 days now without comming any closer to solution. I have read 20-30 threads alteast and stil can not resolve this. Please help me out. I have disable anonymous authentication, enable asp.net impersonation. I have added <identity impersonate = "true" /> I have added the a user to the security logins...

mcafee scan comes with Encrypted SSL cookie error

I have this as a vulnerability issue in McAfee scan for my website (ASP.NET with VB.Net, IIS7, SQL Server 2008)- Missing Secure Attribute in an Encrypted Session (SSL) Cookie. What do i have to do to get rid of this vulnerability? please advice ...

Is it possbile in ASP.NET to deny access to a number of directories using single directive?

Is it possible to deny access not only per directory using directive <location> but a to a number of directories at one time? Or I have to use every time <location> for each directory? ...

Change a web.config programmatically with C# (.NET)

How can I modify / manipulate the web.config programmatically with C# ? Can I use a configuration object, and, if yes, how can I load the web.config into a configuration object ? I would like to have a full example changing the connection string. After the modification the web.config should be written back to the harddisk. ...

ASP.NET Membership setup - Database problems

I am setting up a membership provider, and as a result, I am getting the following error message: An attempt to attach an auto-named database for file C:\Users\Mcoroklo\Desktop\Programmering\Private Projekter\ASP.NET\Helpdesk\Version4\HelpDesk\ClientSite\App_Data\ASPNETDB.mdf failed. A database with the same name exists, or...