Writers' Community!
Home News Business Science & Technology Life
Front Page Page Two Columnists Submit an Article FAQs Contact Author Login
Article Submission
We Need YOUR Articles!
We'll Promote Them for FREE!

Author Login

New Authors
Register Here


Now Serving 5,541 Authors
48,405 Quality Articles
& 6,431 Current Users Online!
Featured Authors
Avis Ward (12,701)
Richard Nicastro (2,545)
Dianne Lehmann (3,016)
Mogama (12,129)
Mike Fak (7,094)
Robert Melaccio, Sr. (6,658)
David Pekrul (613)
Terry Mitchell (2,761)
Sara O'Rourke (392)
Joel Hendon (4,797)
Susan Thom (9,073)
Laura Trahan (32,764)
Abigail Richards (6,279)
Peggy Butler (3,497)

View All Featured Authors
Most Recent
15 Secrets for a Super Successful Consumer Website

PHP and people go hand-in-hand in evolution

Perl of Wisdom, Perl of laughter

PHP’s Paamayim Nekudotayim: The secret’s in the code.

The Macromedia Flash man looks to LEGO for a System.

Your Website Concept

What Makes A Good Website?

How To Build a Basic Web Page

Basic step to Photo Corrections in Photoshop CS

Mastering Photoshop Shapes In 3 Easy Steps

Home » Categories » Website Technologies » Website Design » Upgrading to ASP.Net 2? Why Your Website Might Stop Working When You Do. » Printer Friendly

Upgrading to ASP.Net 2? Why Your Website Might Stop Working When You Do.

Rated 4 out of 5
No Reader Ratings Available ?
Rate It  /  View Comments  /  View All Articles submitted by John Belthoff
Submitted Saturday, April 01, 2006
John Belthoff (56)
Studio JB
Log in to become a member of John Belthoff's Fan Club!


Asp.Net version 2 was just recently released by Microsoft and contains a feature rich set of classes that can do just about anything imaginable. However if your thinking about hosting your asp.net 2 site on a shared hosting environment there are a few considerations you should know about before you take the plunge. If you have already upgraded you may be wondering why your site that was working fine in version 1.1 but now has problems working in Asp.Net version 2.

Code Access Security

If you receive one of those generic yellow error messages that say something like the following:

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

The Reason? - Code Access Security!

As it turns out many shared hosting companies are setting the Security Trust level in the asp.net version 2.0 machine.config files to the default “Medium" setting then locking it down so it can’t be overridden by the application.

This is great from hosting perspective but not so good if you are a developer that uses asp.net functions like xml.load from another website, webrequest, webclient, system.net, etc… or many other classes that a default medium trust setting doesn’t allow.

What can you do?

There are a number of considerations on how to rectify this situation and the first is to contact your hosting company and ask them to create a modified version of the medium trust machine.config file to allow for the features you want to implement.

Microsoft has provided an article that describes this process and if you’re hosting company is not aware of it than shame on them.

The article can be found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000020.asp - How To: Use Medium Trust in ASP.NET 2.0

Give this a good read as it explains not only how to modify medium trust but also how to code for the medium trust settings.

If that is not an option you might want to consider recoding your entire website to conform to medium trust, not a very good option, or moving to a hosting company that will work with you for your particular needs.

Allowing open socket connections is a security risk for a hosting company, but if you can establish that your code is not malicious a reputable hosting company should provide you with proper security clearance to utilize the rich classes that asp.net version 2.0 has to offer. After all they are claiming to sell you asp.net version 2.0. And if you can’t use version 2’s classes than you are not getting what you paid for.

Over time there will need to be a balance between the hosting companies security needs and the ability of a web developer to utilize the classes that make asp.net version 2.0 so brilliant and I hope that time comes sooner rather than later.


John Belthoff is a Professional Audio Engineer and an Avid Web Developer who plays and also teaches Jazz Guitar in his spare time. His latest web projects include the Internet Production Guide and he owns a small Asp Hosting Company. You can contact him at his personal web site by searching Studio JB.



Reprint Rights

Log in to become a member of John Belthoff's Fan Club!

Comments on this article:
No comments yet.


Was this article helpful to you? Leave a Public Comment or Question:

 

This Article has been viewed 602 times.
Article added to SearchWarp.com on Saturday, April 01, 2006
View other articles written by John Belthoff (56)


If you found this article interesting, you may want to check out:

Disclaimer:  All information on this site is provided for informational purposes only! By no means is any information presented herein intended to substitute for the advice provided to you by any health care or other professional or organization.


Today's Most Popular
How to Create a Splash Page for Your Website?

Build A Successful Website For Dummies

Unique Grunge Effects on Photoshop

Creating Dynamic Website Content with PHP - MySQL

Graphic Artist Salaries

How To Build a Basic Web Page

Photoshop’s Pen Tool for Tracing Vectors

PHP Session Handling

Basic Design Principles Part 2 Tone, Texture, Light, and Shade

New style in brochure printing

Home  |  Page Two  |  FAQ's  |  Contact  |  Terms of Service  |  Article Submission Guidelines  |  Writers' Contests  |  Privacy  |  Mission / About
Copyright © 1999-2008 SearchWarp.com, All Rights Reserved - SearchWarp.com is an IcoLogic, Inc. Company