All About ASP.NET and ASP.NET Core 2 Hosting BLOG

Tutorial and Articles about ASP.NET and the latest ASP.NET Core

ASPHostPortal.com Announces Drupal 7.37 Hosting Solution

clock June 8, 2015 12:49 by author Dan

ASPHostPortal.com was established on the goal to provide high quality hosting services for everyone. We believe that providing high quality services should come at an affordable price. For this reason they have provided exceptional plans, at the lowest prices, for the best services possible, on fastest nodes ever. Nowadays, we offer Drupal 7.37 hosting with premium service and cheap price.

Drupal website design has several advantages over other web design tools, techniques, and systems. The Drupal content management system (Drupal CMS) is highly flexible, user friendly and provides a wider range of functionalities that are not possible with several other content management systems. Drupal provides comprehensive control over each aspect of the website, thus merging the functionalities of website design and site management.

Drupal website development enables the users to obtain higher returns on their investments. The major features of Drupal are the creation and maintenance of user account registration, easy menu management, customization of page layouts, simple system administration, and inclusion of RSS feeds. Drupal is reliable, fast, scalable, and guarantees high performance through its content management system. The chief advantage of Drupal is the plugging of its themes and modules seamlessly into any website design. Drupal enable the customers to have clean URLs, multiple languages support, variety of themes and Drupal module development, easy personalization, online help, and advanced searching options.

ASPHostPortal.com support team have lot of experience in website designs using Drupal tools, particularly Drupal CMS. We know how to deliver Powerful, Fast and Reliable Drupal Hosting with the Superior Customer Support. We only use the best hardware, super fast network, covered by 24/7 Support Team. Our Drupal Hosting plans come with up to 99.99% uptime and 30-Day Full Money Back Guarantee. To learn more about Drupal 7.37 Hosting, please visit http://asphostportal.com/Drupal-Hosting

About ASPHostPortal.com :
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. ASPHostPortal.com has ability to support the latest Microsoft and ASP.NET technology, such as: such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. ASPHostPortal include shared hosting, reseller hosting, and sharepoint hosting, with speciality in ASP.NET, SQL Server, and architecting highly scalable solutions. ASPHostPortal.com strives to supply probably the most technologically advanced hosting solutions available to all consumers the world over. Protection, trustworthiness, and performance are on the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



ASP.Net Hosting - ASPHostPortal.com :: Solving Time View Errors in ASP.NET MVC

clock June 4, 2015 06:40 by author Dan

One of the best things about using a compiled language over a scripting language is that you get compile-time checks that prevent run-time errors later. ASP.NET MVC uses a hybrid approach by default. Views are compiled at run-time, but controllers, models, and other classes are pre-compiled. MVC also allows you to create strongly-typed views, but since those views aren’t compiled until run-time, you don’t always get warned about changes to your models (like property name changes) or other errors in your view until it’s running.

There’s a simple way to change this, though, by setting the views to build at compile time. Unfortunately this setting isn’t exposed in the Project Properties page in Visual Studio, but can still set it up manually. Here’s how:

    >> Right-click on your project file in Visual Studio’s Solution Explorer and choose Unload Project.
    >> Right-click the project file again and choose Edit YourProject.csproj.
    >> Look for a node called <MvcBuildViews> in the first <PropertyGroup> node (the one without any other attributes). If it’s not there, add it.
    >> Add or update the value inside the <MvcBuildViews> node to true. When you’re done it should look like this:

    <MvcBuildViews>true</MvcBuildViews>

    >> Save the project file changes.
    >> Right-click the project file in Solution Explorer one last time and select Reload Project.

Your views will now be built at compile -time and you will get syntax errors from any mistakes in your Razor syntax or breaking changes to your model, and you’ll get them long before your code makes it in front of users.

Keep in mind that, though, if you like to edit your .cshtml files while you’re running the debugger, these changes will no longer show up in the browser until you recompile the application again. I guess you can’t have it all!

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers ASP.NET MVC hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



ASPHostPortal.com Announces Fast and Cheap MojoPortal 2.4.0.9 Hosting Solution

clock June 1, 2015 08:34 by author Dan

Established in 2008, ASPHostPortal.com is one of the leading ASP.NET hosting providers offering quality service with premium support. We maintain and operate its own network. Their servers are built using the latest technology and housed in 4 continents (US, Europe, Asia, and Australia). We are passionate about hosting and strive to deliver an excellent level of service to each customer. Today, we announce MojoPortal 2.4.0.9 hosting for all new or exist customers with cheap price.

mojoPortal is an extensible, easy to use, full featured, mobile friendly content management system (CMS) and web application framework written in C# ASP.NET. Includes Blogs, Forums, Calendar, Google/Bing Maps, Contact Form, Newsletter, Polls, Surveys, ecommerce and more. If you can make an ASP.NET UserControl then you already know how to implement a feature. Supports MS SQL 2005/2008/SqlAzure, SQL CE, MySql, PostgreSql, SQLite, or Firbird Sql. MojoPortal places a lot of emphasis on web standards and accessibility. Straight forward CSS skinning.

MojoPortal also runs in Medium Trust. It is considered to be very strong as a standalone CMS. It is easy to learn and very simple to use. It includes a variety of different tools such as blogs, photo galleries, chat, newsletters, pools, forums, and much more. It also has a very strong community which makes troubleshooting extremely simple.

ASPHostPortal.com serve people since 2008 and we know how to deliver Powerful, Fast and Reliable MojoPortal Hosting with the Superior Customer Support. Fully managed and monitored around the clock, our servers run on Windows Operating system with lots of memory (RAM) and up multiple Quad-Core Xeon CPU's, utilizing power of the Cloud Services. Our MojoPortal Hosting plans come with up to 99.99% uptime and 30-Day Full Money Back Guarantee. To learn more about MojoPortal 2.4.0.9 Hosting, please visit http://asphostportal.com/MojoPortal-Hosting

About ASPHostPortal.com :

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. ASPHostPortal.com has ability to support the latest Microsoft and ASP.NET technology, such as: such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. ASPHostPortal include shared hosting, reseller hosting, and sharepoint hosting, with speciality in ASP.NET, SQL Server, and architecting highly scalable solutions. ASPHostPortal.com strives to supply probably the most technologically advanced hosting solutions available to all consumers the world over. Protection, trustworthiness, and performance are on the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



ASP.NET Hosting - ASPHostPortal.com :: Solving Cannot Attach The File '.mdf' as Database in MVC

clock May 28, 2015 06:44 by author Dan

While doing database update using code-first migrations in ASP.Net MVC, came across the strange exception and details are as follows,

Issue back ground details,
1. Manually deleted auto created ".mdf" file from App_Data folder using Visual Studio.
2. Executed update-database in package manager console. Then got the below exception,

System.Data.SqlClient.SqlException (0x80131904): Cannot attach the file 'E:\Backup\Practice\MVC4\DotNetExamples\DotNetExamples\App_Data\DotnetExamples.mdf' as database 'DotnetExamples'.

at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)

at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)

at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)

at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)

at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)

at System.Data.SqlClient.SqlConnection.Open()

at System.Data.Entity.Migrations.DbMigrator.ExecuteStatements(IEnumerable`1 migrationStatements)

at System.Data.Entity.Migrations.Infrastructure.MigratorBase.ExecuteStatements(IEnumerable`1 migrationStatements)

at System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, XDocument targetModel, IEnumerable`1 operations, Boolean downgrading, Boolean auto)

at System.Data.Entity.Migrations.DbMigrator.ApplyMigration(DbMigration migration, DbMigration lastMigration)

at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.ApplyMigration(DbMigration migration, DbMigration lastMigration)

at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)

at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)

at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)

at System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update(String targetMigration)

at System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.RunCore()

at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()

ClientConnectionId:7c44a645-a831-418e-b8e6-88232006e97a

 
No clue about this, how to resolve and after spending lot of time searching on web, came across the following solution. Keeping this for my future reference and it might help for others for same type of problem,

Solution:

If you delete the DB file, it still stays registered with SqlLocalDB. Sometimes it fixes it by deleting DB. We can do this from the command line.

Open the "Developer Command Propmpt for VisualStudio" under your "Start/Programs menu->All Programs->Visual Studio 2012->Visual Studio Tools"

    Run the following commands:

    sqllocaldb.exe stop v11.0

    sqllocaldb.exe delete v11.0


Now execute "update-database" command from package manager console and it will create database for you without any obstacles.

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers ASP.NET MVC hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



ASPHostPortal.com Announces Cheap Magento 1.9.1.1 Hosting Solution

clock May 26, 2015 07:47 by author Dan

ASPHostPortal.com serve people since 2008 and we know how to deliver Powerful, Fast and Reliable Magento Hosting with the Superior Customer Support. Our superior servers are housed in US, UK, France, Germany, Netherlands, Australia, and Singapore with up to 100MB/s connection and Cisco Hardware Firewalls. Fully managed and monitored around the clock, our servers run on Windows Operating system with lots of memory (RAM) and up multiple Quad-Core Xeon CPU's, utilizing power of the Cloud Services. Our Magento Hosting plans come with up to 99.99% uptime and 30-Day Full Money Back Guarantee. Today, we offer high quality Magento 1.9.1.1 hosting at cheap price.

Magento hosting is currently available from hundreds of thousands of providers. The decision of what Magento hosting company to use can be the difference between the success and the demise of a Magento shopping cart website. While any Magento hosting, eCommerce hosting, or even generic web hosting company may look the same at first glance- placed in very simple terms, nothing could be further from the truth.

Security is a topic that's crucial for any eCommerce web site. If your site stores valuable financial info such as credit card numbers and personal contacts, as most Magento shops do, the severity of this topic is multiplied. No organization can afford to risk the devastating effects of having such data compromised. Many Magento hosting environments consist of private, virtual partitions of a server. This protects against a number of potential exploits that can be opened up by irresponsible webmasters that might otherwise share a server with your Magento shopping cart site.

ASPHostPortal.com provides Premium Magento 1.9.1.1 hosting plans on high performance servers and high-speed internet connection in the world. We provide high quality Magento hosting at an affordable price. We care for the clients, ensuring each and every client is more than just satisfied day in and day out. We only use the best hardware, super fast network, covered by 24/7 Support Team. To learn more about Magento 1.9.1.1 Hosting, please visit http://asphostportal.com/Magento-Hosting

About ASPHostPortal.com :
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. ASPHostPortal.com has ability to support the latest Microsoft and ASP.NET technology, such as: such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. ASPHostPortal include shared hosting, reseller hosting, and sharepoint hosting, with speciality in ASP.NET, SQL Server, and architecting highly scalable solutions. ASPHostPortal.com strives to supply probably the most technologically advanced hosting solutions available to all consumers the world over. Protection, trustworthiness, and performance are on the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



ASP.NET Hosting - ASPHostPortal.com :: How to Fix ASP.NET Menu Control Cannot Work in Google Chrome

clock May 22, 2015 06:16 by author Dan

Problem

If your website is using ASP.NET Menu Control, the menu part will not work in Google Chrome browser and Apple Safari browser. The look and feel of the main menu is different. Submenu does not show up.

Solution

There is an easy fix for this problem. Just copy and paste the following codes to your page load event of your code behind master page file. You may need to copy it to every page if you do not use master page.

     Partial Class Main
        Inherits System.Web.UI.MasterPage

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If Request.UserAgent.IndexOf("AppleWebKit") > 0 Then
                Request.Browser.Adapters.Clear()
            End If
        End Sub
    End Class

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



ASPHostPortal.com Announces Cheap Microsoft OWIN 3.0.1 Hosting Solution

clock May 18, 2015 11:46 by author Dan

ASPHostPortal.com is a web hosting provider dedicated to providing high quality web hosting at an affordable price. We care for the clients, ensuring each and every client is more than just satisfied day in and day out. We only use the best hardware, super fast network, covered by 24/7 Support Team. We have locations in 7 world class data centers, located USA, UK, France, Germany, Netherlands, Singapore and Australia. Each of locations will provide with amazing performance. Today, we offer high quality Microsoft OWIN 3.0.1 hosting at cheap price.

OWIN defines a standard interface between .NET web servers and web applications. The goal of the OWIN interface is to decouple server and application, encourage the development of simple modules for .NET web development, and, by being an open standard, stimulate the open source ecosystem of .NET web development tools. Microsoft Owin 3.0.1 Provides a set of helper types and abstractions for simplifying the creation of OWIN components.

With IIS supporting Owin it is possible to run other Owin-enabled frameworks such as Nancy on IIS. With Microsoft’s web frameworks depending on Owin and not IIS it is possible to run those in other environments, such as self hosting within a process or on a web server on linux running Mono. SignalR and Web API already uses Owin which means that they can be self hosted and other cool stuff. ASP.NET MVC6 which is part of ASP.NET vNext will be completely based on Owin. Transfer your host to ASPHostPortal.com to get faster and cheaper Microsoft OWIN solution.

We have established thousands of connections worldwide and multiple points of presence both domestically in the United States and worldwide. We have the capabilities to provide the quality, power and speed to keep businesses optimized and running quickly over the internet. Our goal is to provide and connect thousands of clients around the world with a personalized hosting solution to meet the rising information technology demands of businesses. To learn more about Microsoft OWIN 3.0.1 Hosting, please visit http://asphostportal.com/ OWIN-Katana-ASPNET-Hosting

About ASPHostPortal.com :

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. ASPHostPortal.com has ability to support the latest Microsoft and ASP.NET technology, such as: such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. ASPHostPortal include shared hosting, reseller hosting, and sharepoint hosting, with speciality in ASP.NET, SQL Server, and architecting highly scalable solutions. ASPHostPortal.com strives to supply probably the most technologically advanced hosting solutions available to all consumers the world over. Protection, trustworthiness, and performance are on the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



FREE ASP.NET Hosting with ASPHostPortal.com :: How to Fix ASP.NET 4.0 has not been Registered on the Web Server Error

clock May 6, 2015 06:54 by author Dan

When making an ASP.NET website throughout IIS 7 in Visual Studio 2008/2010, you can find the following issue:

“ASP.NET 4.0 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.0 in order for your site to run correctly, Press F1 for more details”

This error usually occurs if you have installed IIS 7.x ‘after’ installing .NET. In order to resolve the error, do the following:

Step 1: Open Control Panel > Programs > Turn Windows Features on or off > Internet Information Services > World Wide Web Services > Application development Feature

Check the box 'ASP.NET' . Also in the Web Management Tools, remember to select IIS 6 Management Compatibility and IIS Metabase as shown below.

Note: Make sure that you are running Visual Studio 2010 as Administrator.

Now run the site from Visual Studio 2010 using Ctrl + F5.

Step 2: If you further get the error “Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list” or Managed handler is used; however, ASP.NET is not installed or is not installed completely then do a Visual Studio 2010 repair.

Start > Programs > Accessories > Run. Type this command depending on the version of VS 2010 installed.

Silent Repair for 32-bit

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart


Silent Repair for 64-bit

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart

That’s it. Restart IIS and the errors should be fixed.

Step 3: If the errors are not yet fixed, there could be an issue in the Application Pool. Follow these steps

1. Open IIS Manager (Run > Inetmgr) . Expand the server node and then click Application Pools

2. Now select the application pool that contains the application that you want to change. Go to Actions > View Applications.

3. Select the Application pool to change > In Action Pane, click on ‘Change Application Pool’

4. In the ‘Select Application Pool’ dialog box, select the application pool associated with .NET 4.0 from the Application pool list and then click OK.

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



ASPHostPortal.com Announces Excellent Drupal 7.34 Hosting Solution

clock April 13, 2015 13:01 by author Dan

ASPHostPortal.com was established with the goal to provide high quality hosting services for everyone. They believe that providing high quality services should come at an affordable price. For this reason we have provided exceptional plans, at the lowest and free price, for the best services possible, on their fastest nodes ever. Today, they launch Drupal 7.34 hosting with high speed, full features, and FREE.

Drupal is an open source content management platform powering millions of websites and applications. It’s built, used, and supported by an active and diverse community of people around the world. With Drupal, marketers and web developers can create and manage great web, mobile and social experiences. And they can improve and adapt quickly thanks to ongoing innovation and ideas from the Drupal community.

Drupal now presents their new version (Drupal 7.34). Drupal 7.34 was released in response to the discovery of security vulnerabilities. ASPHostPortal offers a powerful Windows hosting platform which allows for easy to manage websites, FTP, email, and etc. Our hosting is housed in a state of the art data centre which gives a totally secure data protection and Super-Quick Network Access. With a knowledgeable support team available 24 hours a day, 7 days a week, you can rest assured that your Websites and Data are Secure and Available for your management anytime. To learn more about Drupal 7.34 Hosting, please visit http://asphostportal.com/Drupal-Hosting

About ASPHostPortal.com :
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. ASPHostPortal.com has ability to support the latest Microsoft and ASP.NET technology, such as: such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. ASPHostPortal include shared hosting, reseller hosting, and sharepoint hosting, with speciality in ASP.NET, SQL Server, and architecting highly scalable solutions. ASPHostPortal.com strives to supply probably the most technologically advanced hosting solutions available to all consumers the world over. Protection, trustworthiness, and performance are on the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



ASP.NET Hosting - ASPHostPortal.com :: Greatness ASP.NET Web Config File

clock March 6, 2015 06:37 by author Dan

Utilizations of XML have been coordinated into .NET to such a degree, to the point that XML is scarcely a trendy expression any longer. Microsoft, as you presumably know, has taken XML into the center of its .NET structure. Not just is XML a by and large acknowledged organization for the trading of information, its likewise used to store design settings.

Design settings for any of your ASP.NET Web applications can be put away in a straightforward content document. Displayed in an effortlessly reasonable XML design, this document, called Web.config, can contain all inclusive information, for example, database association strings, custom slip messages, and society settings.

Since the Web.config is a XML record, it can comprise of any substantial XML labels, yet the root component ought to dependably be <configuration>. Settled inside this label you can incorporate different labels to portray your settings. Since a Web.config record comes as a standard when you begin to manufacture another Web application, how about we take a gander at the default XML document created by Visual Studio .NET:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>
    <compilation 
         defaultLanguage="c#"
         debug="true"
    />
    <customErrors 
    mode="RemoteOnly" 
    /> 
    <authentication mode="Windows" /> 
    <authorization>
        <allow users="*" />
    </authorization>
    <trace
        enabled="false"
        requestLimit="10"
        pageOutput="false"
        traceMode="SortByTime"
    localOnly="true"
    />
    <sessionState 
            mode="InProc"            stateConnectionString="tcpip=127.0.0.1:42424"
            sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
            cookieless="false" 
            timeout="20" 
    />
    <globalization 
            requestEncoding="utf-8" 
            responseEncoding="utf-8" 
   />    
 </system.web>
</configuration>


Experienced ASP.NET software engineers will have perceived that I've forgotten the remark labels that are produced consequently with the record. I've done that to give a reasonable perspective of the XML that is utilized here. Additionally, I'll expand on every design tag later in this article, and this discourse will make the remark labels rather out of date.

In the event that you take a gander at the illustration XML, you'll recognize that the <configuration> tag has one and only tyke tag, which we call segment amass, the <system.web> tag. An area amass regularly contains the setting segments, for example, aggregation, customErrors, confirmation, approval, and so forth. The way this works is really direct: you essentially incorporate your settings in the proper setting areas. In the event that, for instance, you needed to utilize an alternate confirmation mode for your Web application, you'd change that setting in the verification area.

Aside from the standard system.web settings, you can characterize your own particular application settings, for example, a database association string, utilizing the <appSettings> tag. Thus, your most normal Web.config blueprint would be:

<configuration>
  <system.web>
    <! -  sections-->   
  </system.web>
  <appSettings>
    <! -  sections -->   
  </appSettings >
</configuration>


How about we examine the points of interest of both segment bunches now.

The system.web Section Group


In this area bunch, you'll ordinarily incorporate arrangement settings that, in the prenet .time, you'd have set up some place in the IIS organization reassure. At Microsoft's MSDN Library, you can discover a review of every last one of labels that the system.web segment gathering sees, however, contingent upon the multifaceted nature of your website, you may not ever utilize even 50% of those choices.

How about we observe the most important changes you can make inside the system.web area bunch, in sequential order request.

<authentication>

The validation segment controls the sort of confirmation utilized inside your Web application, as contained in the characteristic mode. You'll enter the worth "None" if anybody may get to your application. In the event that verification is obliged, you'll utilize "Windows", "Structures" or "International ID" to characterize the sort of validation. For instance:

    <authentication mode="Windows" />
<authorization>


To permit or deny access to your web application to specific clients or parts, use <allow> or <deny> tyke labels.

    <authorization>
        <allow roles="Administrators,Users" />
        <deny users="*" />
    </authorization>

It's imperative to comprehend that ASP.NET's approval module repeats through the areas, applying the first decide that relates to the current client. In this sample, clients convey the part Administrators or Users will be permitted access, while all others (showed by the * special case) will experience the second control and will accordingly be denied access.

<compilation>

Here, you can arrange the compiler settings for ASP.NET. You can utilize heaps of traits here, of which the most well-known are troubleshoot and defaultLanguage. Set troubleshoot to "genuine" just on the off chance that you need the program to show troubleshooting data. Since turning on this choice decreases execution, you'd regularly need to set it to "false". The defaultLanguage property advises ASP.NET which dialect compiler to use, since you could utilize either Visual Basic .NET or C# for example. It has esteem vb of course.

<customErrors>

To furnish your end clients with custom, easy to use mistake messages, you can set the mode ascribe of this area to On. In the event that you set it to RemoteOnly, custom slips will be indicated just to remote customers, while nearby host clients will see the revolting yet helpful ASP.NET blunders - plainly, this is useful when troubleshooting. Setting the mode credit to Off will demonstrate ASP.NET mistakes to all clients.

On the off chance that you supply a relative (for occurrence,/error404.html) or outright address (http://yourdomain.com/error404.html) in the defaultRedirect characteristic, the application will be naturally diverted to this location in the event of a mistake. Note that the relative location is in respect to the area of the Web.config record, not the page in which the blunder happens. Furthermore you can utilize <error> labels to give a statusCode and a sidetrack characteristic:

    <customErrors mode="RemoteOnly" defaultRedirect="/error.html">
        <error statusCode="403" redirect="/accessdenied.html" />
        <error statusCode="404" redirect="/pagenotfound.html" />
    </customErrors>


<globalization>

The globalization segment is valuable when you need to change the encoding or the way of life of your application. Globalization is such a broad subject, to the point that a whole article could be devoted to the matter. To put it plainly, this area permits you to characterize which character set the server ought to use to send information to the customer (for occurrence UTF-8, which is the default), and which settings the server ought to use to translate and showing socially particular strings, for example, numbers and dates.

    <globalization requestEncoding="utf-8" responseEncoding="utf-8" 
        culture="nl-NL" />


Encoding is carried out through the qualities requestEncoding and responseEncoding. The qualities ought to be equivalent in each of the one-server situations. In this illustration, the application society is situated to Dutch. On the off chance that you don't supply a culture, the application will utilize the server's local settings.

<httpRuntime>

You can utilize the httpRuntime segment to design various general runtime settings, two of which are especially advantageous.

<httpRuntime appRequestQueueLimit="100" executionTimeout="600"/>

The primary quality indicates the quantity of solicitations the server may line in memory at substantial movement times. In the illustration, if there are now 100 appeals holding up to be prepared, the following appeal will bring about a 503 mistake ("Server excessively occupied").

The executionTimeout characteristic demonstrates the quantity of seconds for which ASP.NET may handle a solicitation before its timed out.

<sessionState>

In this segment of the Web.config document, we advise ASP.NET where to store the session state. The default is all the while self:

<sessionState mode="InProc"/>

Session variables are capable, yet they have a couple of drawbacks. Data is lost when the ASP.NET process accidents, and sessions are for the most part futile on account of a Web ranch (numerous Web servers). In that example, an imparted session server can explain your issues. It's past the extent of this article to develop this point, however its justified regardless of a notice. More data on sessionState can be found in the MSDN Library on the web.

<trace>

Your application's follow log is spotted in the application root organizer, under the name trace.axd. You can change the showcase of following data in the follow segment.
The properties you will search for at first are empowered: localOnly, and pageOutput.

<trace enabled="true" localOnly="true" pageOutput="false"/>

Set localOnly to "false" to get to the follow log from any customer. On the off chance that you set the estimation of pageOutput to "genuine", following data will be added to the base of every Web page.

The appSettings Section Group

Aside from the Website design settings I've been discussing in the first passages, you'll realize that a developer every now and again likes to utilize custom broad constants to store data over different pages. The most engaging case of such a custom consistent is a database association string, however you can presumably consider handfuls more from your own particular experience.

The shared element of these constants is that you need to recover their qualities automatically from your code. The Web.config document gives the likelihood to do as such, yet as a security measure, these constants must be incorporated in the <appSettings> area bunch. Much the same as <system.web>, <appSettings> is a direct youngster tag of the Web.config's arrangement root.

An average custom area gathering would look something like this:

    <appSettings>
        <add key="sqlConn" value="Server=myPc;Database=Northwind" />
        <add key="smtpServer" value="smtp.mydomain.com" />
    </appSettings>


The case demonstrates that keys and qualities can be incorporated in the custom application settings by means of a <add> tag. The best approach to get to such a worth in any of your Web pages is delineated underneath:

ConfigurationSettings.AppSettings("sqlConn")

Yes, its as simple as that! Note that the estimation of these settings is constantly a String arrangement.

A Few Other Issues

I won't go into them here, yet the Web.config record can contain a few other area bunches other than the previously stated system.web and appSettings, for example, the configSettings bunch.

  • A Web application can contain more than one Web.config document. The settings in a record apply to the catalog in which its placed, and all kid catalogs. Web.config records in kid registries outweigh the settings that are determined in guardian indexes.
  • Web.config documents are ensured by IIS, so customers can't get to them. On the off chance that you attempt to recover a current http://mydomain.com/Web.config record, you'll be given an "Entrance denied" mistake message.
  • IIS screens the Web.config records for changes and reserves the substance for execution reasons. There's no compelling reason to restart the Web server after you adjust a Web.config document.

Shutting Remarks

In this article, I've touched upon the potential outcomes that the Web.config document offers the ASP.NET developer. You can utilize the effortlessly open XML document to characterize your application settings, without the bother of utilizing the IIS administration reassure. With the Web.config document, ASP.NET gives you a chance to include, change and erase essential design settings like confirmation and approval, custom mistake showing, and following in a direct way.

Besides, the Web.config document offers you space to characterize any custom key you require, for example, database association strings. What we've accordingly seen is that, with only one line of code, you can recover the data you require from any page in your application.

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



Cheap ASP.NET 4.5 Hosting

We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions


Author Link

 photo ahp banner aspnet-01_zps87l92lcl.png

 

Corporate Address (Location)

ASPHostPortal
170 W 56th Street, Suite 121
New York, NY 10019
United States

Tag cloud

Sign in