I've been searching around on a way to use the new features of web deployment in VS2010, namely the transformations for config files, but everything I reference just says "right-click on web.config and add config transforms".Is it possible to do config transforms (and get all of the other publish goodness) in a 3.5 ASP.Net MVC project in VS2010? Is it just an msbuild file?
We have a couple transformations available for our web.config. How can I enable one of our staging or release configurations in my development environment? I'm trying to duplicate an issue from our staging environment in my development environment. Is this possible?
When you run an application in the debugger, it appears to not apply the transformations to the web.config based on your build selection. Is this the case or am I missing something? It appears to be working just fine if I publish to local IIS, just does not seem to work in the debugger.
I'm a fan of the new VS 2010 Web.config transformations. I use this feature for deployment purposes and wondered if it is possible to use them for debugging too.I think of using them in the IDE: I want to create different built configuration (with linked transformation configurations); choose one of them; start the web site in the IDE and debug the different configurations this way.
I really like the new transformation feature for the web.config. It seems to work when I do "Build deployment package" but not when I just want to locally start the debugging using the green arrow. It just uses the web.config without processing theWeb.Debug.config. I can prove that because in web.config I have debug="false" with a transformation in Web.Debug.config so that it gets true but everytime VS asks if it should modify the web.config to enable debugging which it should've done automatically with the following transformation:
Am I missing something here? I used to work with NAnt to modify/create the web.config as a pre-build event but I thought that I wouldn't need it anymore. Am I wrong? The project is a freshly created asp.net mvc 2 web application.
I'm trying to develop my first web application using Web.Config transformations.Trying to run the app (building with the "Dev" build configuration)in the Asp.Net Debugging web server built into VS the site doesn't seem to work - the "Web.Dev.config" configuration doesn't appear to be seen by the application.
I've just enabled config transformations on a .NET 3.5 project in VS2010 RC after watching Scott Hanselman's video on web deployment. Unfortunately every time I go to publish I now get the following error:
The "TransformXml" task failed unexpectedly. System.UriFormatException: Invalid
If I take a brand new VS2010 web application which already has the configtransformations by default I don't have a problem so I suspect my issue is project related.
We (out IT partner really) recently changed some DNS for a web farmed site we have so that the two production server have round-robin DNS switching between the two. Prior to this switch we didn't really have problems with WebResource.axd files. Since the switch, when we hit the live public URL, we get an error:
Padding is invalid and cannot be removed.
When we hit the specific servers themselves, they load fine. I've researched the issue and it seems since they're sharing assets between two servers, we need to have a consistent machineKey in the web.config for each server so they can encrypt and decrypt consistently between the two. My questions are:
Can I generate a machineKey via a tool on the server, or do I need to write code to do this?
Do I just need to add the machineKey to the web.config on each server or do you think I'll need to do anything else to make the two server work together? (Both web.config's currently do not have a machineKey)
I am currently working on multiple group sites for the same parent company. All the sites are basically the same, and share the same code base however they have different stylesheets, master pages and config files.
As the number of sites is increasing I am finding it difficult to keep the sites synchronised and propagate bug fixes/changes across them all as each has it's own copy of the code.
Does anyone know of a way I could keep a single master copy of the site and easily propogate changes to each of the other sites.
I have three asp.net 2.0 websites running on the same host server and recently upgraded to 3.5. After making changes necessary in the root web.config all sites run, but I've lost the stylesheet for the primary site.
Before the upgrade I had the following in the root web.config
<pages styleSheetTheme="Red" />
I got errors on this line because the upgraded web.config had another <pages> section. I tried adding the stylesheetTheme='Red" to that section and the primary website ran and looked right, but the subs got an error that there was no StyleSheetTheme="Red".
Each site has it's own stylesheets. How can I restore the stylesheettheme to the primary site without putting it in the root webconfig? Or, is there another way to handle this?
I have numerous web sites created over the years. Some were created using FrontPage with aspx pages added that were created in VS 2003 or VS 2005. Others were web sites that were actually created with VS 2005 or 2008. All these older sites reside in the C:Inetpubwwwroot folder of my present development computer, with only the .sln and the .suo files residing in the project folder. All of the sites have counterparts on the Internet.I am about to build a new computer and would prefer to only install VS 2010 on it. When Previously building new computers, I installed VS 2005 and VS 2008 so that I could administer
I have multiple sites hosted at a hosting company that does not support domain pointing. Right now I have all of my domains go to the root directory and Response.Redirect() to a sub-directory which leaves me with mydomain.com/subdir/. Is there a way to make my own pointer to eliminate the /subdir/ portion of the URL?
The reason I found was that it was looking for app.config and I had provided the details in web.config. My question is why does the system.configuration differentiate between web.config and app.config.
I upgrade my application from .NET 2.0 to .NET 4.0. Everything went smooth, with very few errors. Now the code is compiling fine, but run time environment is loading the configuration parameters from app.config instead of web.config;Here is my setup:Objects project: has app.configUI project: has web.config, When I run this site, it is fetching the configuration parameters from app.config. Any idea if I need to make any changes to read it from web.config instead of app.config? It used to work fine in my previous environment.
I am interested in developing Web Parts that can be used in our ASP.NET sites and our SharePoint sites. An example Web Part I have in mind is a Post Code (Zip Code) look up.- Visual Studio 2010 Premium- SharePoint Designer 2007- Windows 2003 Server (therefore WSS 3.0)- No SharePoint Server
I built my ASP.NET website using vs2008 professional.
Now I have purchased vs2010 professional edition.
I do format my computer and then installed vs2010.
Now I want to deploy my website in vs2010, but it is giving configuration error in <add assemblies...
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 your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'System.Core, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Web.config is the main settings and configuration file for an ASP.NET web application. The file is an XML document that defines configuration information regarding the web application. The web.config file contains information that control module loading, security configuration, session state configuration, and application language and compilation settings. Web.config files can also contain application specific items such as database connection strings
<!-- This is an example Web.config file -->
Step 1: Create a new ASP.NET website. Add a button control to the Default.aspx.
Step 2: Right click the project > Add New Item > Web Configuration File
Add the following sample entry to the appSettings section in the web.config between the <configuration> tag as shown in the example 1:
<add key="var1" value="SomeValue"/>
<input type="button" value="Get" onclick="ReadConfigSettings();" /> That's it. Run the application and click the button. The value of the key in the appSettings will be displayed in the alert window. I hope you liked this short article.