 |
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
|
|
|
|
|

December 21st, 2013, 01:59 AM
|
|
Registered User
|
|
Join Date: Dec 2013
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
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.
|
|

December 21st, 2013, 08:32 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

December 23rd, 2013, 01:00 AM
|
|
Registered User
|
|
Join Date: Dec 2013
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
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.
|
|

December 23rd, 2013, 07:45 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
 |
|