FAQ Database Discussion Community


C# ConfigurationSection Propeties are empty

c#,web-config,configurationsection
Good evening people, im working on a little project and the ConfigurationSection i wrote is not returning the data i put in in the web.config. enter code here my code: public class AdminSection : ConfigurationSection { private static AdminSection uniqueInstance; public static AdminSection Instance { get { return uniqueInstance ??...

MVC 5 globalization culture

c#,datetime,web-config,asp.net-mvc-5,globalization
I am coding a MVC 5 internet application that is being deployed to Azure. I am wanting to setup browser based culture so that DateTime values are displayed in the correct format for different cultures. Here is my web.config code: <globalization culture="auto:en-US" uiCulture="auto:en-US" enableClientBasedCulture="true"/> Is this all that needs to...

Heroku deployment - RoR - “Detected manifest file, assuming assets were compiled locally”

ruby-on-rails,ruby,heroku,web-config
RoR rookie here with a small issue regarding Heroku deployment. Asset pipeline is not getting compiled when I deploy to Heroku. I tried a lot of suggestions available online but with no success. In my build, I see "Detected manifest file, assuming assets were compiled locally" message and my page...

Writes to database seem to have no effect

asp.net,iis-7,web-config,iis-6,httpmodule
I am working with an ASP.NET web application written in C# deployed to IIS/Windows Server 2008 R2. The application uses NHibernate to interact with an Oracle database running on a networked unix server. It seems that writes being made by the application to the database have no effect. If I...

Custom config section error on file download in MVC

c#,asp.net-mvc,web-config,configsection
I'm using a custom configuration section in my web.config in an ASP.NET MVC 5 project. It works perfectly fine, until I try to download a file via a link: <a href="@Url.Action("Download", new { id = Model.Id })">... Here's how I'm handling the download in the controller: return new FileStreamResult(myStream, "application/octet-stream")...

rewrite rule .htaccess to web.config

web-config,url-rewrite-module,isapi-rewrite
Currently I'm running site on simple linux hosting but I bought windows VPS where I installed 2008 server + plesk and I'm trying to move the site on new VPS. I occured a problem - The first index.php page looks fine but it's just LOG-IN page so I have to...

Azure Cloud Services, deny access to subfolder using web.config

azure,web-config,windows-server-2008,azure-web-roles
I have PHP application that I develop on my local Server 2008 dev server, I then push this to my live site on Azure Cloud Services. This all works fine. In one of my sub folders I have a web.config file with the following in it: <configuration> <system.webServer> <security> <authorization>...

IIS 7.0 URL REWRITE

asp.net,iis,url-rewriting,web-config
I am setting up a redirect to WWW for one of our sites in the web.config and ran into a small issue. The code I have in the web.config for the rewrite is as follows : <rewrite> <rules> <rule name="Redirect to www" patternSyntax="Wildcard" stopProcessing="true"> <match url="*" /> <conditions> <add input="{HTTP_HOST}"...

Issue with Similar Rewrite Rules in Web.config

asp.net,mod-rewrite,url-rewriting,web-config
I have a rule in my web.config that works. <rule name="Guestbook Rewrite" stopProcessing="true"> <match url="(.*?)-guestbook" /> <action type="Rewrite" url="guestbook.asp?gb={R:1}" /> </rule> When someone goes to MyDomain.com/view-guestbook or MyDomain.com/sign-guestbook they go to the appropriate pages. What I am having difficulty with is that I have several pages of guestbook entries, so...

How to pass value from web.config to external js file?

jquery,asp.net-mvc,web-config
I Have web.config file <appSettings> <add key="interval" value="100"/> </appSettings> Im trying to pass value "100" to js file in my folder Scripts to change interval of slide. This is my js file $(function () { $("#slideshow > div:gt(0)").hide(); setInterval(function () { $('#slideshow >div:first') .slideToggle(500) //.fadeOut(1000) .next() //.fadeIn(1000) .slideToggle(500) .end() .appendTo('#slideshow');...

VS 2013 HttpHandlers not working after upgrading from 2010

asp.net,visual-studio-2013,web-config
I recently upgraded an ASP.NET project from Visual Studio 2010 Professional to Visual Studio 2013 Community. In the project we have defined some custom handlers that would handle requests from Ajax or special user requests (getting images). The problem is, now that I'm running 2013 when I run in Debug...

web config file setting to live asp.net website

c#,asp.net,sql-server,web-config
this is my first asp.net project and i am trying to live it but i am not sure about setting of 'web.config' file. below error it is showing. 500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed. <?xml...

How to best manage shared app config contents among projects

c#,visual-studio,configuration,web-config,app-config
I have one back-end DLL project, which is layer on top of database. I have several fron-end projects, with either app.config or web.config. All front-end projects share some configuration sections. Manually keeping the shared config sections in sync before testing and release looks stupid. What is good practice to get...

IIS rewrite rule to redirect https to http not working

asp.net,iis,url-rewriting,web-config
There's lots of questions here about redirecting http to https so I figured it would be easy to reverse the process. However, everything I've tried hasn't worked. I'm trying to combine the rule with my canonical host name rule (it's the first rule, at the top of the rewrite rules):...

IIS and Yii2 pretty URL

.htaccess,iis,web-config,yii2
What is the .htaccess equivalent for IIS to enable pretty URLs in Yii2 on IIS. Indeed, I don't know what could I do with web.conf to allow those URLs.

C# How to create custom section without parent node

c#,web-config,app-config,configurationmanager,custom-sections
I have worked by below article. http://www.jokecamp.com/blog/net-custom-configuration-section-collection-and-elements/ I can achieve if I do like what it said. But I want to remove parent node. I want xml to seems like below. <?xml version="1.0"?> <configuration> <configSections> <section name="jobSection" type="MyConfiguration.JobSection, MyConfiguration" /> </configSections> <jobSection> <job id="1" name="Job Name A" /> <job id="2"...

ASP.Net AppSettings in Command of SqlDataSource

c#,asp.net,web-config,sqldatasource
I have a SqlDataSource that I am trying to set an insert command with additional text after every table to switch for testing. I wanted to do this with an <appSetting> in the web.config. When I do the following <asp:SqlDataSource ID="SqlDataSourceDRDocument" runat="server" ConnectionString="<%$ ConnectionStrings:ISNORTHConnectionString %>" ProviderName="System.Data.SqlClient" InsertCommand="insert into DR_Document<%$ AppSettings:tablename...

How do you declare or use variables in web.config

iis,web-config
Because our web application is using both Entityframework and System.Data.SqlClient, we need to have 2 . This is very error prone, as you need to make you update both with the same data. So i wonder if its posible to add variables to the web.config xml? <connectionStrings> <add name="Server" value="sql2014"...

IIS-URL Rewrite, URL rule to lowercase except querystring

regex,asp.net-mvc,iis,web-config,url-rewrite-module
Hi I am using the URL Rewrite module in IIS. I would create a rule to convert lowercase urls. But, I'm having problems. My goal is to do the following: http://www.doMain.com/App/ActIon?X=1&y=3&JJ=3... => http://www.domain.com/app/action?X=1&y=3&JJ=3... My first failed attempt was: <rule name="LowerCaseRule1" stopProcessing="true"> <match url="[A-Z]" ignoreCase="false" /> <action type="Redirect" url="{ToLower:{URL}}" /> </rule>...

How to register a custom control in Web.config file using powershell script

asp.net,powershell,web-config,custom-controls,nuget
When Nuget package for a custom control is installed, I want to register the control automatically inside the <controls> section of Web.config file. I'm new to Powershell script. I want to add the following line inside the <controls> section of the Web.config file if it is not added already. <add...

IIS Url Rewrite rule HTTP to HTTPS AND add WWW

c#,.net,iis,url-rewriting,web-config
I have a website that I want to be only used with the WWW sub-domain and via HTTPS. I had an URL rewrite working for adding WWW. But now I also want to force a HTTP to HTTPS redirect. Just forcing HTTPS works as well, but when I can't really...

DNN module uninstall how to remove settings from web.config

web-config,settings,dotnetnuke,manifest,uninstall
I have a DNN manifest file with this: <configuration> <nodes> <node path="/configuration/appSettings" action="update" key="key" collision="overwrite"> <add key="LocalCurrencyCode" value="ARS"/> </node> and for uninstall I have this: <uninstall> <configuration> <nodes> <node path="/configuration/appsettings/add[@name='LocalCurrencyCode']" action="remove" /> However, when I uninstall the module the setting is not removed from web.config. Can anyone see what I...

How to configure WCF Service with wsHttpBinding hosted on IIS and consumable over Web?

web-services,wcf,iis,web-config,wshttpbinding
I'm not experienced with WCF Service in general (this is my 1'st attempt to create, configure and consume WCF Service). I've created my WCF Service, tested it through WCF Test Client (on Development PC "in" Visual Studio) and everything was working. I've hosted it in IIS on our Server (not...

How does ASP.NET compile config files, such as web.config or machine.config?

asp.net,web-config,config
In reading this question, I asked in one of the answers the following: This answer implies that ASP.NET reads web.config and other config files from the top, ie: top-down. I thought config files were read as a "single instance" meaning that the compiler first parses the config file for accuracy...

Windows Azure: redirect website from www to non-www

redirect,azure,iis,web-config,rewrite
I have this web.config file on my server. <rewrite> <rules> <rule name="HTTP to HTTPS redirect" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" /> </rule> <rule name="Rule" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile"...

Why ASP.NET website customErrors mode=“Off” not working

c#,asp.net,iis,web-config
Our ASP.NET 4.0 web application on production server (Windows Server 2008 R2 64bit with IIS7.5) is not showing detailed error message despite adding the following settings in the web.config file: <?xml version="1.0"?> <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration> According to this MSDN article, we should get the detailed error message...

Reading Another Application's Web.Config to get ConnectionString

c#,winforms,web-config
How can I read another application to get connectionString .. I have path of web.config File But there are multiple connection strings in it and I want to get the only non commented connection string. <connectionStrings> <add name="DbConString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\abcd\Data\abcd.accdb;" providerName="System.Data.OleDb"/> <!--<add name="DbConString" connectionString="Persist Security Info=False;User ID=sa;Password=123;Initial Catalog=abc;Data Source=afrt-WIN7JPN-80\SQLEXPRESS"...

how to store cookie permanently

c#,asp.net,session,cookies,web-config
I don´t want to show mail id in my application code. I want to give text box and what ever email id I will give it should be stored in web.config file for ever until I change it. string store= "[email protected]"; ConfigurationManager.AppSettings["MailId"] = store; string message1 = ConfigurationManager.AppSettings["MailId"]; <appSettings> <add...

error in Webconfig “Server Error in '/' Application”

asp.net,web-config
i keep getting this error in my webconfig dunno why. im trying to use AD authentication in my asp.net c# website <authentication mode="Forms"> <forms name=".ADAuthCookie" timeout="10" loginUrl="Login.aspx" defaultUrl="Default.aspx"> </forms> </authentication> <authorization> <deny users="?" /> <allow users="*" /> </authorization> <membership defaultProvider="DomainLoginMembershipProvider"> <providers> <add name="DomainLoginMembershipProvider"...

How to specify Oracle SID to connectionStrings in web.config?

asp.net,oracle,web-config
I have an ASP.NET application whose connection to the database seems to fail to open because of the Oracle SID not being specified. I can't find any doc on how to specify it in the connection string. Did anyone have the same problem?

How to set Password and Username in web.config

asp.net,security,model-view-controller,web-config
In my MVC Application I use the connection string is set in the Web.config via Private connectionString As String = ConfigurationManager.ConnectionStrings("DBCS").ConnectionString and have no problems with my db connection. But since I need a password and username to log into my database I hardcoded that in the web.config <connectionStrings> <add...

Domain Rewrite for both HTTP and HTTPS in IIS 7

redirect,iis-7,web-config,rewrite,isapi-rewrite
I want to do a number of 301 redirects in one request and I found this article to be helpful. However, I have a problem where http://example.com redirects to https://www.example.com BUT https://example.com DOES NOT redirect to https://www.example.com So here are my examples: SEO - remove default.aspx (works fine but no...

Cannot find ConfigurationManager in class library

c#,.net,web-config,class-library,configurationmanager
So, I have a class library that I know will be used by websites and I need to access the config settings. I added a reference to System.Configuration, but I cannot find ConfigurationManager in the class library. A couple of things, one when I added a reference to the System.Configuration,...

Asp.Net - ClientCache - can it vary by file type?

asp.net,caching,iis,web-config,browser-cache
I've been taking a look, and implemented client caching on a development project I'm currently working on. As I'm using Asp.Net, I've updated the web.config file directly with the following code: <staticContent> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" /> </staticContent> I've also implemented a 'fingerprinting' solution which allows me to expire CSS and...

ASP.NET strange behaviour: Adding Debug=true in web.config changes css

css,asp.net,debugging,web-config
Just as the question states: When I add debug=true to my web.config (no other changes anywhere in the code) my page is rendered with no background colour. Any explanation why this should occur?...

How to increase memory_limit in wordpress?

wordpress,web-config,memory-limit
Recently I set my site on my server(http://abc.hostname.com/sitename/) and I get following error: It seems like the memory_limit on the server is too low for the fade on load feature. I add the following code in wp-config.php to solve this error: define( 'WP_MEMORY_LIMIT', '96M' ); also ini_set("memory_limit","60M"); But the error...

Allow others to iframe my site

asp.net,iis,iframe,web-config
If others tries to iframe my set they get error "Refused to display in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN' ". Do they have to change something, or I, or both? I found there are options for X-Frame-Options :SAMEORIGIN,DENY,and allow only one site. Configuration :IIS8, ASP.NET MVC. Is...

URL Rewrite causing redirect loop

.net,iis,iis-7,web-config,iis-8
An issue has been frustrating me today in setting up a URL Rewrite in an old .Net Webforms website (EDIT: It is a Web Site project, not a Web Application project, if that is making a difference). The site I'm working on is linked to a lot, all linking to...

Application keep Alive in Shared Hosting , No Access to IIS Manager [closed]

c#,asp.net,iis,web-config
I am using GoDaddy's shared hosting. My website usually takes time to load everytime when i open it after sometime. I came to know that Asp.net websites starts again after some time-out. Then i came to know that we can Keep Alive our websites via IIS Manager. But i do...

www Rewrite Rules for IIS Web.config Not Working

mod-rewrite,joomla,url-rewriting,iis-7,web-config
I have a rewrite rule in IIS that is supposed to rewrite inbound URL's without the 'www' to 'www'. The rewrite rule is in fact rewriting the URL to include the 'www', but it's directing the visitor to /index.php instead of sending them to the link they were trying to...

How to read custom section data in web.config with minimum code

c#,web-config
here is my custom section in web.config. now i want read data by c# <configuration> <MailList> <MailID id="[email protected]" Value="UK" /> <MailID id="[email protected]" Value="US" /> <MailID id="[email protected]" Value="CA" /> </databases> </configuration> suppose i want technique by which i can only read data based on value. if i supply UK as value...

Web config transform for custom section

c#,asp.net,asp.net-mvc,web-config,web.config-transform
I have numerous different Web.configs in my MVC 5 Application for different environments - eg Test/Prod I have web transforms in place to change values for the different environments. So for example I have the following app setting in my web.config file: <appSettings> <add key="DevDisplayPanel" value="true" /> </appSettings> Then in...

How can I prevent requests from certain domain in web.config?

asp.net-mvc,web-config
I want to restrict one domain for my application in web.config. How can I do it? I just found solution for IIS settings, like <add ipAddress="some_ip_address" /> but I want to restrict a domain, not IP address...

requiresQuestionAndAnswer set to false in web.config but RequiresQuestionAndAnswer is true at runtime

c#,asp.net,web-config,asp.net-membership,sqlmembershipprovider
In an ASP.net web application I have defined the following Membership provider in the web.config: <membership> <providers> <add connectionStringName="MyServer" name="MyServer" type="System.Web.Security.SqlMembershipProvider" enablePasswordReset="true" requiresQuestionAndAnswer="false" enablePasswordRetrieval="false" /> </providers> </membership> When I run the application in the debugger, the property Membership.Provider.RequiresQuestionAndAnswer is true. Why? And how can I fix this? Update: Ar tuntime,...

MVC web.config compilation debug=true - a manual change needed?

asp.net-mvc,web-config,web-deployment
When one creates a MVC project using the the built-in templates (File -> new Project etc) the web.config reads <compilation debug="true" targetFramework="4.5" /> Inside the Web.Release.config I see this transform <compilation xdt:Transform="RemoveAttributes(debug)" /> so I was assuming that when I build in Release mode the debug="true" would disappear. However I...

How to create custom web config?

c#,.net,web-config
I need to create a configuration section in the web.config file. The config section look like this. <component name="name1" title="title1" description="description1"/> <component name="name2" title="title2" description="description2"/> <component name="name3" title="title3" description="description3"/> How to create such a configuration setting and how can I access the attributes in the config in c# code....

Exception (System.Reflection.TargetInvocationException) request via WCF

wcf,web-config,timeout,app-config
i have an error when i send a big string from a WindowsForm to a WCF via Reflection in other proyect. I saw that i need put some parameters in web.config in server and app.config in client (winform). I did it but i have the same exception. Also i put...

Not able to resolve EnableSessionState is set to true error in all DNN pages

asp.net,session,web-config,dotnetnuke,dotnetnuke-7
I have already research in Google about this error but couldn't succeed and finally posted here. I have downloaded my live website, database and integrate it in my local environment. I can only see Home Page but not able to see other pages. I’m facing below error in my all...

How do I change where a web.config for a virtual directory in IIS is generated?

iis,web-config,iis-7.5,virtual-directory
I've created a virtual directory within our intranet web application in IIS 7.5. The virtual directory currently points to the following location: \\fileserver\root\Departments Whenever I enable directory browsing, it creates a web.config within the Departments folder. My question is - Is there a way that I can set this up...

HttpWebRequest.GetResponse() returning 404 Error

c#,asp.net-mvc,iis,ssl,web-config
I have some code that calls HttpWebRequest's GetResponse() method to retrieve HTML from a URL and return it to the calling method. This has been working perfectly fine within my Development and QA environments but now that I have uploaded it to my UAT server, I keep getting the following...

Form Data Not Posting While Using URL Rewrite

asp.net,forms,url-rewriting,asp-classic,web-config
OK. Where to start.... I have a website. It is running on an IIS server using classic asp. I have forms on that website. The forms were working fine until I decided to add some url rewrite rules to my web.config file to redirect nice looking urls. After doing that,...

How to run ASP.NET MVC project inside another ASP.NET MVC project

c#,asp.net-mvc,asp.net-mvc-3,asp.net-mvc-4,web-config
Let's say I have a MVC project where there is root folder MVC2 and. Now, I want another MVC project to that MVC2 folder and serve it. Below url should serve MVC2 project which is just a folder inside the root project. Root project is also MVC. currentSite.com -> current...

Change Accepted MIME Type on Azure without Web.Config

azure,web-config,azure-web-sites
I want to show an .mp4 as a background video on a website I created and deployed to Azure via FTP. Unfortunately, accessing the background video always gives me a 404. The pages are all .html files using AngularJS. I figure that I need to add a custom mime type...

Writing to .config files

asp.net-mvc,web-config,configuration-files,nlog
I am having an issue somewhat similar to this question: C#: Config file error BACKGROUND My situation is this: I am using NLog and I have setup a Database target. My app shows an installation page on first run from which I build a connection string for other purposes but...

Nop Commerce automatically redirecting to different URL

.htaccess,web-config,url-redirection,nopcommerce
I am having a very peculiar issue. For some specific url nop website redirects to another url. For example - This is the url that is supposed to go - when clicked or even pasted in address bar, I debugged the code and in the application_beginrequest method notice the url...

ASP.NET MVC: Is there a syntax to acces a project conditional compile symobl in web.config

syntax,compilation,web-config,asp.net-mvc-5,conditional
ASP.NET MVC: Is there a syntax to acces a project conditional compile symobl in web.config e.g. I could use different databases on a per region basis, or determine whether to require HTTPS, etc. Thanks. A similar question in 2012 did not appear to be optimistic about this: ASP.NET - Conditional...

IIS and Windows authentication not allowing error pages

asp.net,iis,web-config,windows-authentication,global-asax
I have been trying this from last two days. I am not getting whats the problem. I searched the web but didn't find any solution. i tried all the settings of IIS like "Moving negotiate down, disable other authentication" but doesn't work. SO here is my problem: I have a...

TFS 2012 not copying transformed Web.Config to _PublishedWebsite

tfs,msbuild,web-config,tfs2012,octopus-deploy
I have a web project with a config transform. On my local machine, when the project is built, the transform works fine. However, my project is pushed to TFS and built there, the config file is transformed in the main drop folder; However, the version in _PublishedWebsites is the original,...

web.config transformation based on solution configuration

c#,asp.net,.net,web-config,transformation
Morning/afternoon/evening all. I am trying to apply a web.config transformations as part of a Jenkins build. I have got the transformation running by adding the following to my csproj: <Target Name="BeforeBuild"> <TransformXml Source="Web.config" Transform="Web.$(Configuration).config" Destination="Web.config" /> </Target> Which is great except for the fact that it now transforms the file...

Custom error pages based on path/URL in ASP.NET

c#,asp.net,web-config,http-status-code-404,global-asax
I have some pages in /panel/ directory and some in /website/ directory. I need two different 404 pages for these pages based on their path, because these directories have different master pages. when I use customErrors in web.config file, it redirects all pages to one 404 page so it's useless...

Display Image in Kendo Grid : Error during serialization or deserialization using the JSON JavaScriptSerializer

c#,json,asp.net-mvc-4,telerik,web-config
In order to display an image saved as binary in dabatase i do the following: .Columns(columns => { columns.Bound(c => c.Title).Width(420).ClientTemplate(string.Format("{0}...", "#= formatter(Title) #")); columns.Bound(c => c.Text).Width(900).ClientTemplate(string.Format("{0}...", "#= formatter(Text) #")); columns.ForeignKey(p => p.languageId, (System.Collections.IEnumerable)ViewData["lang"], "Id", "Name").Title("Language").Width(140).EditorTemplateName("LangDropDown"); columns.Bound(p =>...

Read connection string from web.config file when deploy to IIS7

c#,wcf,iis-7,web-config
It seems to be pretty simple question but not for me. I am trying to read connection string from web.config file. I have WCF service application which have web.config file. In web.config file I defined connection strings. Then I deployed wcf application on IIS7 under default web site(One template which...

How to resolve AJAX.POST response as 301 when I am using URL redirection in web.config?

asp.net,ajax,azure,web-config
So, after spending lots of time, I had to ask this question. I am sending a AJAX POST request in ASP.NET $.ajax({ type: "POST", url: "Manage.aspx/StUpdate", data: JSON.stringify(obj), contentType: "application/json; charset=utf-8" }); And my Web.config which removes all .aspx extension rules as follows: <rewrite> <rules> <rule name="RemoveASPX" enabled="true" stopProcessing="true"> <match...

System.TypeInitializationException' occurred

c#,asp.net-mvc,web-config
I am making application in ASP.NET MVC 5 C#. I am getting exception while trying to access connection string element from web.config file. An exception of type 'System.TypeInitializationException' occurred in WebPortalClient.dll but was not handled in user code Web.Config: <?xml version="1.0" encoding="utf-8"?> <!-- For more information on how to configure...

Populating choices in an ASP.NET ComboBox from web.config

asp.net,combobox,web-config
There are several answered questions detailing how to refer to a single value from web.config file. I'd like to maintain lists of values with which to populate combo boxes in the Views. Should I use some sort of key/value pair structure, with the key identifying the particular combo box to...

c# RESTful Webservice - Error 404 since change of web.config

c#,asp.net,web-services,web-config
I am developing a webservice with .NET using C#. All works fine at all, but since I have changed my web.config file I got an error back from Server reporting 404 - File not found. The exception occurs after the constructor of the service is done and before the service...

ASP.NET Webforms project is reading from a web.config in a completely different solution on my PC when debugging

c#,vb.net,webforms,web-config
My web app is reading from a web.config from a completely different project with the same name in another solution. How can I check/change what web..config my project is referencing. I want to ensure it is the web.config in the current project.

RegExp web.config - Select path after / and rewrite as URL param

regex,iis,url-rewriting,web-config
I have a requirement to update the web.config file so that it replaces the path after the / and rewrites the URL as follows: domain.com/acct01 -> domain.com/#/?id=acct01 domain.com/acct02 -> domain.com/#/?id=acct02 domain.com/acct03 -> domain.com/#/?id=acct03 ... Currently, for every account I am adding the following to the web.confg file. So for the...

IIS URL rewrite rule using conditions

asp.net,regex,iis,url-rewriting,web-config
I have the following URL rewrite rule configured in my web.config file: <rule name="Test Rule" stopProcessing="true"> <match url="^$" /> <conditions> <add input="{QUERY_STRING}" pattern="^(item=1|all|none|first).*$" /> </conditions> <action type="Rewrite" url="/newsite/test.asp?{C:0}" /> </rule> The following source url matches as expected. http://domainname?item=1&param1=x%param2=y However the rewritten url includes param1 and param2 in its query string....

Session Timed out isssue

jquery,session,web-config
I have one master page .Inside this Master page I have loaded the other form. Mostly it's working well. Now issue is, I have set the session timed out 20 minutes. The session times exceed, if page is idle automatically need to go Login page. Is there possible to set...

Error in Web Config in ASP.NET

c#,asp.net,web-config
ASP.NET WebForms and i am making authentication for users , but i get this error in web.config file: Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify...

WCF Websocket service “could not find a base address that matches schema http” error

wcf,websocket,web-config,basic-authentication
I have a problem to make my WCF websocket service working. Until now I cannot find how to establish a connection. Both client and server side are really simple. So I think I miss something obvious here. I currently have one WCF service running properly in my solution. The web...

Webconfig error ASPX and ASHX

asp.net,vb.net,web-config,ashx
I have been put in charge of maintaining an old legacy website(hasn't been touched in maybe 4-5 years) using ASPX and ASHX. The website was working decently on server 2003, but the web host forced us to move to 2008. Upon moving to 2008 we received this error Config Error...

ASP.NET MVC5 Custom Errors hitting 500 instead of 400, 403 or 404

c#,web-config,asp.net-mvc-5,elmah,custom-errors
I have setup Custom Errors for my site as my Web.config shows below: <system.web> <customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="~/Error/Error400"> <error statusCode="400" redirect="~/Error/Error404"/> <error statusCode="404" redirect="~/Error/Error404" /> <error statusCode="403" redirect="~/Error/Error403" /> <error statusCode="500" redirect="~/Error/Error500" /> </customErrors> </system.web> And also <system.webServer> <httpErrors errorMode="Custom"...