.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Clean Web.Config Files (VS 2010 and .NET 4.0 Series)

Posted By: Pankaj Mishra     Posted Date: September 14, 2009    Points: 2   Category :ASP.Net
.NET 4 includes a new version of the CLR, and a new .NET 4 specific machine.config file (which is installed side-by-side with the one used by .NET 2, .NET 3 and .NET 3.5).

The new .NET 4 machine.config file now automatically registers all of the ASP.NET tag sections, handlers and modules that we've added over the years, including the functionality for:

.ASP.NET Dynamic Data
.ASP.NET Routing (which can now be used for both ASP.NET WebForms and ASP.NET MVC)
.ASP.NET Chart Control (which now ships built-into ASP.NET V4)
What this means is that when you create a new "Empty ASP.NET application" project in VS 2010, you'll find that the new default application-level web.config file is now clean and simple:

View Complete Post

More Related Resource Links

ASP.NET, HTML, JavaScript Snippet Support (VS 2010 and .NET 4.0 Series)

This post covers another useful improvement in VS 2010 - HTML/ASP.NET/JavaScript snippet support. Snippets allow you to be more productive within source view by allowing you to create chunks of code and markup that you can quickly apply and use in your application with a minimum of character typing.

Visual Studio has supported the concept of "snippets" for VB and C# in previous releases - but not for HTML, ASP.NET markup and JavaScript. With VS 2010 we now support snippets for these content types as well.

Code Optimized Web Development Profile (VS 2010 and .NET 4.0 Series)

When you first run VS 2010 it prompts you to select an IDE profile to use. The profile you select will configure how tool windows are displayed/docked in the IDE by default and set the default keyboard shortcuts. You can then customize any of these settings by using the Tools->Options menu within the IDE and then override/change them. You can also later reset your profile and pick a different one by choosing the Tools->Import and Export Settings menu command.

VS 2010 and .NET 4 Series

VS 2010 and .NET 4 are the next major releases of our developer tools and framework. Together they contain a ton of new functionality and improvements that I think you'll really like, and which make building applications of all types easier, faster and better. The improvements range from nice small tweaks to major, major enhancements - and can be found across the .NET Framework, the languages, and the IDE.

Feature available to Silverlight 4 with VS 2010.

In Part I of this article series we have seen some features available to Silverlight 4 with VS 2010. We will continue to explore more in this article.

reading values from config files in NUnit tests


One of my NUnit tests has to read in some values from config files.  In my main application this process works perfectly well, however when I run the unit test, the code that reads in the values from the config files doesnt read anything in.  Ive tried putting app.config in my unit test project (I even tried web.config) but nothing seems to work.  Are there any special steps involved when reading from config files in an nunit test ?

NUnit and config files


Ive created an NUnit test project in my solution and have added 3 tests.  They all fail with the same error

SetUp : System.TypeInitializationException : The type initializer for 'Systems.Utils.ConstantHelpers' threw an exception.
  ----> System.NullReferenceException : Object reference not set to an instance of an object.


SetUp : System.TypeInitializationException : The type initializer for 'Systems.Utils.ConstantHelpers' threw an exception.

  ----> System.NullReferenceException : Object reference not set to an instance of an object.

heres the test method

        public void CreateDataContext_ConnectionString_ReturnsDataCon

The ASP Column: What's in ASP.NET Config Files?


Even though you've been using ASP. NET for a while, how much do you really know about ASP. NET configuration files? While you've probably touched the Web. config file from time to time, there are some nuances involved in configuring ASP.

George Shepherd

MSDN Magazine September 2004

Visual Studio 2010 Creates Two Solution Files


When I create a new file system based web application in Visual Studio 2010, for example, named as "MyWebSite", two folders were created by the studio: MyWebSite and MyWebSite(2). The second folder only contains a solution file while the first folder has the solution file as well. Is this a new feature? Where is the setting that can avoid the second folder? Thanks,

Video: Rendering SharePoint 2010 Media Files in Silverlight

This demonstration illustrates how to render SharePoint media files in a Silverlight application. (Length: 11:28)

how to read config details from multiple config files

Hi, My web application contain 3 config files with different names, ex. firstconfig.config, secondconfig.config, thirdconfig.config.  Each config files have same Key Value pairs. Now what i want to do is, based on the condition i want to read specific info from specific config file. What i tried is, in Web.config files  <appSettings file="firstconfig.config"></appSettings>   In this way i get th info from that particular config file.  Now how do i get details from other 2 config files.   Can any one know abt this.   S. Ramkumar  Smiley

Building WCF appl in VS C# 2010 Express doesn't provide app.config when New Proj specified

Hey guys, I am trying to get my feet wet with the WCF environment. I was following a tutorial that wanted to alter the New Project Application that I tried to follow along with & when it came to making changes to the app.config file, it was nowhere to be found?! I tried a second time to start a new project using the WCF REST option and this time a rcv the following msg: **The project file 'J:\USER\TOMJ\APPDATA\LOCAL\TEMP\VC4TLPEZ.Y3X\TEMP\WCFRESTSERVICE4.CSPROJ' CANNOT BE OPENED. The project type is not supported by this installation. ??! ** IAm I missing something in my VS 2010 C# Express application? If so, someone please tell me how to resolve this problem.   Thanks in advance . . . TomJTom Johnson

Updating Config Files in Sharepoint Farm

I am trying to update config files web.comnfig in the Virtual Directory of my server so that users are allowed to upload more that 50 MB of files in my IIS 7 server. Everytime i do the update it works fine but after few days when there are few changes then it removes the added elements itself and restore in the Original Stage. I used to edit my config files manually. I found a way of creating a config files and saving it to the Config Directory under 12 Hive in Server. Like the Content will be similar as follows <actions>    <add path="configuration/SharePoint/SafeControls">       <SafeControl          Assembly="System.Web, Version=1.0.5000.0, Culture=neutral,             PublicKeyToken=b03f5f7f11d50a3a"          Namespace="System.Web.UI.WebControls"          TypeName="*"          Safe="True"/>    </add>   </actions> I have to add following line <system.webServer>     <security>       <requestFiltering>         <requestLimits maxAllowedCon

Need Best Practices for SSI packages (dtsx-files + ONE config)

Please advice hot to keep connection string for many packages at one place. Idea is to have one .dtsConfig-file for each iteas is not acceptable. DEV, TEST and PROD - different virtual computers. Each one can have it's own config-file lying in one and the same folder (c:\bi\configs\)

Is it possible to create WSP files within Designer 2010?

I'm just getting to grips with Designer 2010 and was wondering if I edited a CSS, Pagelayout or Masterpage (for example), how easy it would be to package them up into a WSP file? Would it be easy to export the changes within Designer into VS2010? Can you import the changes into VS2010? Or would I have to do it the hard way and copy each file and drop them into a WSP project in VS2010 and then build and deploy? Just getting my head around which would be more automated - if at all. Cheers.   Keith.

Creating Lists On Share-point 2010 Server from .stp list template files using Features

Plz, let me know, how to create list on share-point 2010 server from .stp list template files using features in C#

Problem Saving Files to A Sharepoint 2010 Site from Office 2010: Saves locally by default rather tha

Hi we are starting to use sharepoint 2010 / word 2010 and have found an interesting bug/problem. Sometimes when a user tries to save a file (by clicking on the save button in the quick access toolbar for word 2010) the save dialog comes up with the users local "Documents" folder as the path (not the correct sharepoint path where the document should be saved).  (I should say that we are creating the file from sharepoint by using a toolbar on the document library, with the new button)  We are using a content type and a template attached to the document library when we create the file.  This is really annoying because the user might not notice that the document is saving locally and not to sharepoint.  I have found a strange workaround which involves clicking the [File] tab on the ribbon in word 2010, then clicking "Save and Send" and then clicking the save button again.  At this point word 2010 seems to "remember" that it is trying to save document to sharepoint and shows the sharepoint document library. This is a real nuisance which could lead to documents being lost/misfiled if people don't realize that this is happening.  Can anyone help me? Thanks Kevin krd

Missing/Required binary files on one Web-front-end after installed the CU aug 2010 hotfix?

Hi! I have installed the binary files for CU aug 2010 hotfix in a farm with two web-front-ends. In Central Administration you can see that on Web-front-end one (that also is hosting the Central Administration app) the binary files are missing but not on the second Web-Front-End. The installation went fine on both servers with the exception that I had to reboot the Web-Front-end one. When I try to run Psconfig to update my databases I get en error message like this in my command prompt. The upgrade command is invalid or a failure has been encountered. The server farm will not work with missing installs. Add "-cmd installcheck -noi nstallcheck" to the command-line to ignore this warning. The following is missing on web-front-end one: Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) In the event log I get a lot of these errormessages too (EventID 3351): SQL database login for 'SharePoint_Config' on instance 'SqlAliasName' failed. Additional error information from SQL Server is included below. Login failed for user 'Domian\servername (one)$'. The thing is that the files is installed in the filesystems aswell as the dll files in the GAC on both servers. You can´t unistal
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend