Things only work in development machine not in "REAL" web server

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

There are a couple of things that are bothering me, any help on these is
greatly appreciated. This is using ASP.NET 2.0

1. I am sending email in my web app, using a simple form here is the code:

Dim MyMailFrom As New Net.Mail.MailAddress("portal@xxxxxxx",
"Portal XX.com")
Dim MyMailTo As New Net.Mail.MailAddress("info@xxxxxxx")
Dim MyMail As New Net.Mail.MailMessage(MyMailFrom, MyMailTo)
Dim MySMTP As New Net.Mail.SmtpClient("mail.xxx.com")

MyMail.Subject = "Web Contact"
MyMail.IsBodyHtml = True
MyMail.Priority = Net.Mail.MailPriority.High
MyMail.Body = "All the fields entered in the form"

MySMTP.Credentials = New Net.NetworkCredential("portal@xxxxxxx",
"myacctpwd")

Try
MySMTP.Send(MyMail)
Catch ex As Exception

End Try

This work well in my development computer but when I publish the site to a
remote server (that has .NET 2.0 and IIS) it gives me this error:

Method not found: 'Void
System.Net.Mail.MailMessage.set_Priority(System.Net.Mail.MailPriority)'


2. When a user returns to my site, I tried to read a cookie, this code
worked OK in .NET 1.1, basically it is the same, but then again, it only
works in my development machine, not in the web server the site gets
published to, here is the code (this code exists in Global.asax SessionStart
Event)

If Not Request.Cookies("SCCountry") Is Nothing Then
Session.Add("IdPais",
CType(Server.HtmlEncode(Request.Cookies("SCCountry")("Pais")), Integer))
Else
If Session("IdPais") <> 1 And Session("IdPais") <> 2 Then
Response.Redirect("SelCountry.aspx?RedirPage=" &
Request.Url.AbsoluteUri)
End If
End If

Dim SUserLogin As SC.Objects.Usuario.s_SessionUser

If Not Request.Cookies("SCUser") Is Nothing Then
SUserLogin =
SC.Objects.Usuario.LoginFromCookie(Server.HtmlEncode(Request.Cookies("SCUser")("Email")),
Server.HtmlEncode(Request.Cookies("SCUser")("Code")))
If SUserLogin.ID > 0 Then
Session("LoggedIn") = True
Session("User") = SUserLogin
Session("UserName") = SUserLogin.NombreCompleto
End If
SUserLogin = Nothing
End If

I appears that in the web server this cookie is not being read at all, i can
see the cookie stores in the client computer by manually going to where
cookies are stored but nothing happens when i visit the page.

TIA!!!


.



Relevant Pages

  • RE: cookies
    ... user's Web browser will send an information request to ... The Web server will respond to the ... request by transmitting the desired information to the ... cookie go unnoticed, ...
    (microsoft.public.windowsxp.newusers)
  • Re: how to set/get cookie for a raw iocp http server?
    ... suppose you access my web server once. ... your ie will cache this value as cookie. ... first time come here. ... computer name can't judge the precise user. ...
    (microsoft.public.vc.atl)
  • Re: help with dynamic platlist generation
    ... one shows how to send a specific cookie as part of the request URL ... The media server sends the clients cookie data over to the web server ...
    (microsoft.public.windowsmedia)
  • Re: Which is the most mature Soap module?
    ... > Do you mean subclassing SOAPpy and changing the places where it uses ... My problem is that the SOAP ... > can send to the web server in the http header, ... > let me through to the SOAP server unless I can supply the cookie first. ...
    (comp.lang.python)