views:

822

answers:

3

I'm a bit surprised that this isn't on more forums as it is a total show stopper. I have a ASP.NET app that calls a web service I wrote. It is hosted on a shared hosting site. Recently the company moved my server to allow for both 1.1 and 2.0 applications. The trust level has changed from 'full' to 'medium' and my code has stopped working. The company will not make any changes to their machine.config file or add my web service as an endpoint. I can not override the setting in my web.config file and I cannot set the originUrl in my web.config file.

My client's small business site is now off-line and she will go out of business.

I have upgraded my code to 2.0 and in my web.config files I set the trust level to "Medium" (I learned that lesson the hard way) but even on my development machine I canot get past the call to my web service. I get the "System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

I have read that I should be able to 'code around' these issues but I have no idea where to even start.

Has anyone any idea on what I need to do to get my code working on a totally locked down hosting server where no changes to my config file are allowed...

The best bottle of the best whiskey I can buy to the person who helps me find a solution to this. ;-)

+1  A: 

It sounds to me like your web host is not very flexible. I would ask them about adding the needed permissions they allow. I had the same problem with Server Intellect and after speaking with them and telling them the permission I needed, they helped out and worked it out.

Honestly though, there are a lot of hosting companies and a lot who are willing to work with people to get their business. If I were facing the same difficult hosting provider, I would look elsewhere to a provider that will help you out. The change they made caused you pain and they should at least attempt to help you, otherwise move on to someone who wants to support you. Just me 2 cents, probably not a recommendation you were looking for.

Rob Bazinet
Thanks Rob. it's good to know that at least someone else has had these issues and how they sorted them. I am looking to change I just hate my client losing business due to my work. Thanks again.
Skittles
+2  A: 

Hey... Get a VPS... That will let you set your own permission levels. Shared hosting is the craps.

For a while I used Godaddy to host a website, which had a multi-threaded app that ran alongside my website. Godaddy killed it, and then I had to move hosts... NOw i have my own server but it csots me $190 a month. If you want a windows server cheap, you can get one strating $50 a month. I don't know if that's in your budget, but that will give you FULL access to the PC including remote desktop.

I hope this was some help.

Cyril Gupta
from where i can get these prices? just examples
Amr ElGarhy
Look on sitepoint forums. (search google for sitepoint)
Cyril Gupta
A: 

Hostgator seem to be the best among the lot.I am using hostgator.

Avery