471,595 Members | 1,567 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,595 software developers and data experts.

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

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

Jan 5 '07 #1
7 2167
If your ISP wont up the setting from medium - whicc is unlikely you may be
better off trying to make a request using socket calls over http.

Theres a really good article here that explains your problem.
http://www.wrox.com/WileyCDA/Section/id-291738.html
--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11*********************@51g2000cwl.googlegrou ps.com...
>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

Jan 5 '07 #2
I've read the article already, and if I'm not mistaken, you need to use
the <trusttag 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 <trusttag at all causes an error.

Any ideas now?

Thanks,
Amit
John Timney (MVP) wrote:
If your ISP wont up the setting from medium - whicc is unlikely you may be
better off trying to make a request using socket calls over http.

Theres a really good article here that explains your problem.
http://www.wrox.com/WileyCDA/Section/id-291738.html
--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11*********************@51g2000cwl.googlegrou ps.com...
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
Jan 5 '07 #3
I would try making a raw socket call over http and see if that works. If it
does, you can still extract your remote pages using standard get requests.
Some good code about to get you started on something to test it easily.

http://www.devarticles.com/c/a/C-Sha...g-in-C-Part-I/

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11**********************@i15g2000cwa.googlegr oups.com...
I've read the article already, and if I'm not mistaken, you need to use
the <trusttag 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 <trusttag at all causes an error.

Any ideas now?

Thanks,
Amit
John Timney (MVP) wrote:
>If your ISP wont up the setting from medium - whicc is unlikely you may
be
better off trying to make a request using socket calls over http.

Theres a really good article here that explains your problem.
http://www.wrox.com/WileyCDA/Section/id-291738.html
--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11*********************@51g2000cwl.googlegro ups.com...
>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

Jan 5 '07 #4
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
John Timney (MVP) wrote:
I would try making a raw socket call over http and see if that works. If it
does, you can still extract your remote pages using standard get requests.
Some good code about to get you started on something to test it easily.

http://www.devarticles.com/c/a/C-Sha...g-in-C-Part-I/

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11**********************@i15g2000cwa.googlegr oups.com...
I've read the article already, and if I'm not mistaken, you need to use
the <trusttag 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 <trusttag at all causes an error.

Any ideas now?

Thanks,
Amit
John Timney (MVP) wrote:
If your ISP wont up the setting from medium - whicc is unlikely you may
be
better off trying to make a request using socket calls over http.

Theres a really good article here that explains your problem.
http://www.wrox.com/WileyCDA/Section/id-291738.html
--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11*********************@51g2000cwl.googlegrou ps.com...
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
Jan 6 '07 #5
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
"AmitKu" <am****@gmail.comwrote in message
news:11**********************@38g2000cwa.googlegro ups.com...
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
John Timney (MVP) wrote:
>I would try making a raw socket call over http and see if that works. If
it
does, you can still extract your remote pages using standard get
requests.
Some good code about to get you started on something to test it easily.

http://www.devarticles.com/c/a/C-Sha...g-in-C-Part-I/

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11**********************@i15g2000cwa.googleg roups.com...
I've read the article already, and if I'm not mistaken, you need to use
the <trusttag 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 <trusttag at all causes an error.

Any ideas now?

Thanks,
Amit
John Timney (MVP) wrote:
If your ISP wont up the setting from medium - whicc is unlikely you
may
be
better off trying to make a request using socket calls over http.

Theres a really good article here that explains your problem.
http://www.wrox.com/WileyCDA/Section/id-291738.html
--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11*********************@51g2000cwl.googlegro ups.com...
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


Jan 6 '07 #6
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

John Timney (MVP) wrote:
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
"AmitKu" <am****@gmail.comwrote in message
news:11**********************@38g2000cwa.googlegro ups.com...
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
John Timney (MVP) wrote:
I would try making a raw socket call over http and see if that works. If
it
does, you can still extract your remote pages using standard get
requests.
Some good code about to get you started on something to test it easily.

http://www.devarticles.com/c/a/C-Sha...g-in-C-Part-I/

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11**********************@i15g2000cwa.googlegr oups.com...
I've read the article already, and if I'm not mistaken, you need to use
the <trusttag 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 <trusttag at all causes an error.

Any ideas now?

Thanks,
Amit
John Timney (MVP) wrote:
If your ISP wont up the setting from medium - whicc is unlikely you
may
be
better off trying to make a request using socket calls over http.

Theres a really good article here that explains your problem.
http://www.wrox.com/WileyCDA/Section/id-291738.html
--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11*********************@51g2000cwl.googlegrou ps.com...
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
Jan 8 '07 #7
If they are hosting asp 2.0 then medium trust is the default. What you need
to ask is if they will provide custom medium trusts.

I cant really recommend any hosters as I host my servers myself.

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11**********************@11g2000cwr.googlegro ups.com...
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

John Timney (MVP) wrote:
>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
"AmitKu" <am****@gmail.comwrote in message
news:11**********************@38g2000cwa.googlegr oups.com...
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
John Timney (MVP) wrote:
I would try making a raw socket call over http and see if that works.
If
it
does, you can still extract your remote pages using standard get
requests.
Some good code about to get you started on something to test it
easily.

http://www.devarticles.com/c/a/C-Sha...g-in-C-Part-I/

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11**********************@i15g2000cwa.googleg roups.com...
I've read the article already, and if I'm not mistaken, you need to
use
the <trusttag 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 <trusttag at all causes an error.

Any ideas now?

Thanks,
Amit
John Timney (MVP) wrote:
If your ISP wont up the setting from medium - whicc is unlikely you
may
be
better off trying to make a request using socket calls over http.

Theres a really good article here that explains your problem.
http://www.wrox.com/WileyCDA/Section/id-291738.html
--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"AmitKu" <am****@gmail.comwrote in message
news:11*********************@51g2000cwl.googlegro ups.com...
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

Jan 8 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

19 posts views Thread by Darren | last post: by
reply views Thread by Michael Howes | last post: by
reply views Thread by AmitKu | last post: by
reply views Thread by AmitKu | last post: by
6 posts views Thread by =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.