URL Posting Fails in Medium Trust (3rd time posting this w/ zero replies so far)

A

AmitKu

I am trying to do a URL post using HttpWebRequest, but it fails because
I am hosting on Network Solutions, and their servers are all medium
trust. Apparently HttpWebRequest doesn't work on medium trust.

Is there any way to do URL posting in a medium trust environment? I'm
hoping I don't need to switch hosts because of this.

Btw I've posted this a 3rd time now because I've yet to receive any
replies whatsoever. I've called around looking for new hosts, and both
companies I've spoken with run in medium trust as well. So is URL
posting not ever going to allowed again? Is there something simple here
that I'm missing? Please help.

Thanks in advance,
Amit
 
A

AmitKu

I've read the article already, and if I'm not mistaken, you need to use
the <trust> tag in your web.config file.

I've tried this, but unfortunately they've made it so that no overrides
can be done. So having the <trust> tag at all causes an error.

Any ideas now?

Thanks,
Amit
 
A

AmitKu

Actually socket calls do not work in medium trust either.....

So is url posting just a thing of the past now since it's basically
outlawed on shared environments, which is what most people use?

--Amit
 
J

John Timney \(MVP\)

I thought that would be the case. I expect you may have already tried, but
if not have a crack at overriding the machine.config setting in your own web
config for your application?

<system.web>
<trust level="High" originUrl="" />

If that doesn't work (its not likely too) then I can only suggest you take
it up with your ISP, as there should be no reason why they cannot set a
custom Medium Trust configuration to allow you to use use IO operations.
Its common practice on shared hosting. Your ISP should be able to add an
IPermission class entry to the web_mediumtrust.config file on the web server
to override for your application. If they dont know how to do this, they
are clearly idiots and you might be better off taking your business
elsewhere.

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
 
A

AmitKu

As I wrote earlier, I've tried that and they won't let me override the
machine.config file...

And I'm afraid they might be idiots as you're saying. Unfortunately,
it seems every host I've contacted is in medium trust. Does that mean
that half of asp.net is not going to work ever again until I get rich
and can buy my own server and set it up the way I want?

Do you know of any nice asp.net 2.0 host that allows you to do what you
want to do, or at least let you make some small overrides on their
machine.config file?

--Amit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top