SMTP in Medium trust environment

Last post 04-24-2008 3:34 PM by Antilles128. 8 replies.

Sort Posts:

  • SMTP in Medium trust environment

    04-23-2008, 8:07 AM
    • Loading...
    • daveh551
    • Joined on 02-23-2008, 3:38 AM
    • Posts 22

    I hope this is the right group.

    I'm a newbie at websites (though I've been programming for 30 years). I'm just getting my first deployment running on GoDaddy Economy (Windows, shared hosting, IIS 6.0, .NET 2.0), which is running Medium Trust.

    GoDaddy's SMTP  server uses a non-standard port (either port 80 or port 3535).  When I include the port= attribute in the mailsettings section of the web.config file, it barfs on it when I try to send a message (Says something like "You don't have sufficient permissions to change the port", and highlights that line of the web.config). If I don't include the port= attribute, then it times out, of course, since the server is not listening on the default port.

     I've opened a support ticket asking for help, but, assuming they don't respond with anything useful (they do occasionally surprise me, but not very often!), does anybody know of a way around this?  I've speculated that I might try using the form of the SmtpClient constructor that takes the port number (new SmtpClient(string hostname, int port) ), but I suspect if it's barfing on the port= attribute, it would probably barf on that too. Also, that would not help me in using the PasswordRecovery control, which apparently contains it's own SmtpClient that I would not be able to change.

    I'm sure someone has encountered this before, so I hope there's a solution.
     

  • Re: SMTP in Medium trust environment

    04-23-2008, 8:45 AM
    • Loading...
    • satalaj
    • Joined on 11-28-2007, 5:41 AM
    • Pune
    • Posts 896

    use port =25

    <system.net>

     

    <
    mailSettings>

    <smtp deliveryMethod="Network" from="">

    <network host="m" password="" port="25"

    userName="" />

    </smtp>

    </mailSettings>

    </system.net>

    satalaj

  • Re: SMTP in Medium trust environment

    04-23-2008, 2:23 PM
    • Loading...
    • daveh551
    • Joined on 02-23-2008, 3:38 AM
    • Posts 22

    That doesn't help, nor does it work.

     Since the default port is 25, putting port="25" is the same as not putting anything.  It doesn't work because the server is not listening on port 25, so the connection times out. (I have a suspicion GoDaddy might be blocking outbound traffic on port 25, because I can't connect to the mailserver on my other hosting site either.)


     

  • Re: SMTP in Medium trust environment

    04-24-2008, 12:18 AM
  • Re: SMTP in Medium trust environment

    04-24-2008, 1:18 AM
    Answer
    • Loading...
    • Antilles128
    • Joined on 01-28-2008, 10:08 PM
    • Winder, GA
    • Posts 42

    You need to use Godaddy's smtp relay server: 

            <mailSettings>
                <smtp>
                    <network host="relay-hosting.secureserver.net" />
                </smtp>
            </mailSettings>
     

     

    Jordan Burke
    President - Epik Technologies, LLC
  • Re: SMTP in Medium trust environment

    04-24-2008, 8:44 AM
    • Loading...
    • daveh551
    • Joined on 02-23-2008, 3:38 AM
    • Posts 22

     I had seen that article, but missed the fact that they are also using the default port. I just saw where they said use port 80 or 3535. But that still doesn't work, and, like I say, I suspect they are blocking outbound traffic on port 25, because I can't get to other servers that I know ARE working on port 25.

    Thanks for your help. 

  • Re: SMTP in Medium trust environment

    04-24-2008, 8:46 AM
    • Loading...
    • daveh551
    • Joined on 02-23-2008, 3:38 AM
    • Posts 22

    Antilles128:

    You need to use Godaddy's smtp relay server: 

            <mailSettings>
                <smtp>
                    <network host="relay-hosting.secureserver.net" />
                </smtp>
            </mailSettings>

     

     

     

    That one worked! Thanks so much.  (Now how in the world would anybody have known that? Oh, and I still haven't gotten a reply from GoDaddy support, after 36 hous.) 

  • Re: SMTP in Medium trust environment

    04-24-2008, 8:55 AM
    • Loading...
    • satalaj
    • Joined on 11-28-2007, 5:41 AM
    • Pune
    • Posts 896
  • Re: SMTP in Medium trust environment

    04-24-2008, 3:34 PM
    • Loading...
    • Antilles128
    • Joined on 01-28-2008, 10:08 PM
    • Winder, GA
    • Posts 42

    Hey, no problem!  I spent about 10 hours tearing my hair out trying to figure it out my first time around.  I finally broke down and called the GoDaddy Tech Support (Thank God for free long distance cell phone plans!), and after about 2 hours, I finally got someone who even knew what I was asking about.  So spread the word; hopefully we can get this information into the hands of the people who need it!

    Jordan Burke
    President - Epik Technologies, LLC
Page 1 of 1 (9 items)
Microsoft Communities
Page view counter