asp.net, url rewrite module and web.config

I was able to get this working in Visual Studio 2010. Start with Ruslan’s post here and download the 2.0 IntelliSense file. Then, just follow the directions he posted previously here. All I ended up doing was running the following command as Ruslan instructs: C:\download_directory\rewrite2_intellisense>cscript UpdateSchemaCache.js As Christoph points out in his comment, make sure … Read more

Add array to key in web.config

With ConfigurationManager.AppSettings you can only retrieve scalar values. For your example, if you seperate your emails with a semicolon, you can do: string[] emails = ConfigurationManager.AppSettings[“email”].Split(‘;’); with the web.config <add key=”email” value=”[email protected];[email protected]” />

How can I combine the WCF services config for both http and https in one web.config?

Well, one problem with your combined config is that your two endpoints are on the same address – that won’t work. If you’re hosting in IIS, then your server, virtual directory and the *.svc file needed will determine your basic address – it’ll be something like: http://yourservername/VirtualDirectory/YourService.svc If you want to have two endpoints, at … Read more

How to apply config transformations to an external config file

There are few workarounds: Workaround 1 Write AppSettings.Debug.config, AppSettings.Release.config with full values (not with transform attributes) In your web.config, using transformation, substitute with the appropriate file: web.debug.config <appSettings file=”AppSettings.debug.config” xdt:Transform=”SetAttributes” xdt:Locator=”Match(file)”/> web.release.config <appSettings file=”AppSettings.release.config” xdt:Transform=”SetAttributes” xdt:Locator=”Match(file)”/> Its less than ideal, kinda defeats the purpose of transforms but may be appropriate based on one’s situation than … Read more

Could not load file or assembly System.Web.Http, Version=5.2.2.0

Set Copy Local to true in the properties for the System.Web.Http and System.Web.Http.WebHost assemblies and redeploy the package. If this doesn’t solve your problem completely try reinstalling the NuGet package. This will hopefully correct broken dependencies. From the package management console, run this command: Update-Package Microsoft.AspNet.WebApi -reinstall Make sure to install System.Web.Http.WebHost as well.

web.config and app.config machine-specific settings in git

I’d like to suggest you look at ConfigGen. We use it in all our projects, and it works wonders for all the developers and also for all our environments. It basically runs off a spreadsheet that states machine name and output configuration file, and then tokenises a template App.Config or Web.Config, substituting values from the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)