Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > BOOK: Beginning ASP.NET 4.5 : in C# and VB
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 21st, 2013, 01:59 AM
Registered User
 
Join Date: Dec 2013
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Default Deploying your website - Hosted server trust level

Hello Imar or anyone else that might be able to help,

I'm deploying my website to a shared server and am generating security errors. My ISP's Windows environment uses the "Medium" trust level. I thought the website I developed was very benign and not particularly sophisticated so I was surprised with these issues. My website uses .NET memberships and roles (to limit access to web pages and folders) and performs basic CRUD functions against a SQL Server database. Everything works well in my local development environment, which by default is set to "Full" trust. I looked for information on the topic of .Net memberships and roles, and their implications in a medium trust environment, but didn't find much on the specific topic or at least not much that I understood when it came to the security model. Not knowing if something that I did was causing these problems, I decided to create a new website using the ASP.Net Web Forms Site template and not make any modifications to it. I uploaded it to my ISP's server and deployed it. I found that even the template generates security errors when any of the standard web pages (About and Contact) are called by clicking on the navigation hyperlinks. If I manually type the url, the pages work, but if I use the navigation links the server says it can't find the Accounts/Login.aspx page (which is there on the server).

In the book, under Deploying Your Website, there is information on on setting up IIS and moving data but not much on potential security issues. Could you provide me with some ideas about these issues or point me in the right direction for information on this topic? Could I be looking in the wrong direction (membership and roles), could these errors be caused by other components that are automatically inserted into the ASP.NET Web Forms Site template?

In advance, thank you very much.
 
Old December 21st, 2013, 08:32 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Medium trust is obsolete nowadays. Microsoft has provided guidance for hosters on how to get rid of medium trust and use other security mechanisms instead:

http://support.microsoft.com/kb/2698981
http://stackoverflow.com/questions/1...t-a-lost-cause

You could ask your host to fix that, or find a new host.

Regarding the broken links: hard to say without seeing the site.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
pmarti (December 23rd, 2013)
 
Old December 23rd, 2013, 01:00 AM
Registered User
 
Join Date: Dec 2013
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Default Deploying your website - Hosted server trust level

Hi Imar,

Thank you very much for your response. I find it so impressive how you support the folks that read your books and have questions.

I went around and around with my hosting provider, explaining how their Medium Trust level setting seemed to be preventing me from implementing .NET membership and roles security and access. Not surprisingly, they did not change their server settings so I had to switch to another hosting provider. I obviously looked only at hosting providers that offered Full Trust level on their servers. I selected one, uploaded my files, configured the .NET membership and roles to use my MS SQL database and everything worked as it should.

Thank you again for your help, I really appreciate it.
 
Old December 23rd, 2013, 07:45 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Excellent, glad to hear it's working. I think your host is mistaken by insisting on using Medium Trust. It's not as secure as they think it is anyway, and causes more problems than it solves.

Quote:
I find it so impressive how you support the folks that read your books and have questions.
Thanks!

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Email not being sent on hosted website jdlferreira BOOK: Beginning ASP.NET 4 : in C# and VB 2 July 10th, 2012 05:48 AM
Trust level issue on 2008 server mat41 ASP.NET 3.5 Professionals 0 June 26th, 2012 08:50 PM
Custom Membership Provider and Medium Trust level mosi_asgari BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 December 24th, 2006 11:11 AM
Security Exception - application trust level gordonz BOOK: ASP.NET Website Programming Problem-Design-Solution 1 November 24th, 2004 02:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.