I'm developing an ASP.net application on my local IIS, where it works fine. I've set up a Windows 2008 Web Server R2 as a virtual machine in my network, installed the .net framework, all IIS features (server version do match) etc. My apps run fine except for this issue:
I have several Settings that are created by the Settings Property o...
Currently I am using a shared database model for our development. I know, it's better to use local development databases to do database versioning the right way without one developer breaking everyone else's code. So that's what I'm trying to get to. I have a question about the web.config file though. How do I ensure that once every dev ...
Some I do quite a lot of is read integers from AppSettings. What's the best way to do this?
Rather than do this every time:
int page_size;
if (int.TryParse( ConfigurationManager.AppSettings["PAGE_SIZE"], out page_size){
}
I'm thinking a method in my Helpers class like this:
int GetSettingInt(string key) {
int i;
return int.Tr...
I recently started using IConfigurationSectionHandler as a custom configuration section for my BL DLL. I'm using it inside web.config files to pass settings values to the BL DLL.
While it reads the local web.config perfectly, the problem is reading a global configuration file (root web.config) that consists of shared settings.
How can ...
Using http://www.urlrewriting.net/
I want /File1.aspx to be /File1
Ive been trying like this:
<add name="Rule1"
virtualUrl="~/File1"
desinationUrl="~/File1.aspx"
rewriteUrlParameter="ExcludeFromClientQueryString"
ignoreCase="true"
/>
How do i do it?
...
I need to update the handler mappings on IIS 7.5 to allow URLs that don't have extensions to be routed to an application. The application was originally written in ASP.NET 2.0, but then later upgraded to ASP.NET 3.5. I don't know if that has relevance, but I've had no problem updating handler mappings for other .net 3.5 apps before. I sh...
Hopefully there are some WCF wizards out there that can spot my mistake here.
I am trying to set up a global error handler via an IErrorHandler based behaviorExtension on a RESTful JSON WCF Service. The method is decorated as such:
[OperationContract]
[WebGet(UriTemplate = "screens/info", ResponseFormat = WebMessageFormat.Json)]
The...
Hi,
I've been trying to do a simple restful wcf service that will return JSON. Its working if i will run it in the development server. However if I deploy it on IIS 7.5, i will have this error when i accessed it using http://localhost:70
HTTP Error 500.19 - Internal Server
Error The requested page cannot be
accessed because the...
i have a WCf project,
when i add the following code to the configuration file (Web.config):
<configuration> <appsettings> <add key="Hello" value="5"/> </appsettings>....
i get this erro whentrying to debug:
"Unable to start debugging on the web server. The web server is not configured correctly. See help for common configuration erro...
Hi, we have several .net projects where we store certain settings in config files.
Now each developer will have their own config files that differ a little (different connection strings to connect to local db, different wcf endpoints etc.)
At the moment we tend to check out app/web.config files and modify them to suit our needs.
This le...
Can I store custom XML in web.config ? I want to store an XML dom (to store some of my site settings) in my web.config, so the application can read that xml dom and show that value in my page.
...
We have two subdomains for the same site, we would like that depending on the visited subdomain the initial page varies. But in IIS the default document setting is based on the web.config so...
We know that we could use the http:/subdomain/page.aspx but its a requirement that we use only http:/subdomain in the links
Desired example:
...
I have a nant script that is trying to change a URL value in my web.config but Nant keeps throwing this error:
'=' is an unexpected token. The expected token is ';'. Line 1, position 80.
I traced it down to the semicolon in the URL of the nant script. The reason I have a semicolon in the URL in the first place is because the web.conf...
I have an asp.net website and i have a block of code in my global.asax's Application_Error event to send the error details(stack trace etc..) as an email to my email id.Also i have Custom error page set in my web.config.I published the website in release mode and deployed to production.When i access the site,I got some errors and i was s...
I have a application that uses Entity Framework. I have added some custom tables to the application's db and want to map those tables in a different project using EF model and the POCO entity generator template. My separate project needs to be reusable so I will not know the username/password for the connectionstring.
How can I use th...
I am publishing a web page to a local server through VS2010- I haven't published anything new in a couple days and I haven't made any config changes(I think). I have been following my same process for 4-5 months.
Publish shows as succeeded, and my hosted directory on the local machine is showing my changes(I can also debug in VS w/o iss...
Hi,
i tried to configure the .NET Compilation Settings in the IIS Manager but all i see is an Error Message that tells me that there is an unrecognized element in the web.config file in C:\windows\Microsoft.NET\Framework64\v.4.0.30319\config\.
A little bit strange for me is, that i get this error message on my Windows 7 System and also...
Hi all,
I'm trying to set up a YAF forum 1.9.4 and am having a problem with the profile section in the config:
When I tested this locally everything worked fine but on on my web server I get the following error: "The type or namespace name 'ProfileCommon' could not be found"
I have uploaded all files and I can see a file called...
I have few settings which I could place in a separate XML file and have them accessed in the Web app. Then I thought (thinking of one additional file to deploy), why not have them in the web.config itself. However, just because I need to have custom nodes, I can not have the settings under . So, I am thinking of creating a custom config ...
Is it possible to have location authorization nodes in a web.config be external?
Such that I could take all of the nodes simlar to
<location path="elmah.axd">
<system.web>
<authorization>
<allow roles="Administrator" />
<deny users="*" />
</authorization>
</system.web>
</location>
<locati...