473,789 Members | 2,746 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

TCB
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.MailAd dress("po****@x xx.com",
"Portal XX.com")
Dim MyMailTo As New Net.Mail.MailAd dress("in**@xxx .com")
Dim MyMail As New Net.Mail.MailMe ssage(MyMailFro m, MyMailTo)
Dim MySMTP As New Net.Mail.SmtpCl ient("mail.xxx. com")

MyMail.Subject = "Web Contact"
MyMail.IsBodyHt ml = True
MyMail.Priority = Net.Mail.MailPr iority.High
MyMail.Body = "All the fields entered in the form"

MySMTP.Credenti als = New Net.NetworkCred ential("po****@ xxx.com",
"myacctpwd" )

Try
MySMTP.Send(MyM ail)
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.se t_Priority(Syst em.Net.Mail.Mai lPriority)'
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("Id Pais",
CType(Server.Ht mlEncode(Reques t.Cookies("SCCo untry")("Pais") ), Integer))
Else
If Session("IdPais ") <> 1 And Session("IdPais ") <> 2 Then
Response.Redire ct("SelCountry. aspx?RedirPage= " &
Request.Url.Abs oluteUri)
End If
End If

Dim SUserLogin As SC.Objects.Usua rio.s_SessionUs er

If Not Request.Cookies ("SCUser") Is Nothing Then
SUserLogin =
SC.Objects.Usua rio.LoginFromCo okie(Server.Htm lEncode(Request .Cookies("SCUse r")("Email") ),
Server.HtmlEnco de(Request.Cook ies("SCUser")(" Code")))
If SUserLogin.ID > 0 Then
Session("Logged In") = True
Session("User") = SUserLogin
Session("UserNa me") = SUserLogin.Nomb reCompleto
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!!!
Dec 12 '05 #1
3 1758
Check the version number of the .Net Framework 2.0 on your local machine and
on the server. It sounds like they are not exactly the same.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but you can't make it stink.

"TCB" <tc******@hotma il.com> wrote in message
news:O0******** ******@TK2MSFTN GP10.phx.gbl...
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.MailAd dress("po****@x xx.com",
"Portal XX.com")
Dim MyMailTo As New Net.Mail.MailAd dress("in**@xxx .com")
Dim MyMail As New Net.Mail.MailMe ssage(MyMailFro m, MyMailTo)
Dim MySMTP As New Net.Mail.SmtpCl ient("mail.xxx. com")

MyMail.Subject = "Web Contact"
MyMail.IsBodyHt ml = True
MyMail.Priority = Net.Mail.MailPr iority.High
MyMail.Body = "All the fields entered in the form"

MySMTP.Credenti als = New
Net.NetworkCred ential("po****@ xxx.com", "myacctpwd" )

Try
MySMTP.Send(MyM ail)
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.se t_Priority(Syst em.Net.Mail.Mai lPriority)'
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("Id Pais",
CType(Server.Ht mlEncode(Reques t.Cookies("SCCo untry")("Pais") ), Integer))
Else
If Session("IdPais ") <> 1 And Session("IdPais ") <> 2 Then
Response.Redire ct("SelCountry. aspx?RedirPage= " &
Request.Url.Abs oluteUri)
End If
End If

Dim SUserLogin As SC.Objects.Usua rio.s_SessionUs er

If Not Request.Cookies ("SCUser") Is Nothing Then
SUserLogin =
SC.Objects.Usua rio.LoginFromCo okie(Server.Htm lEncode(Request .Cookies("SCUse r")("Email") ),
Server.HtmlEnco de(Request.Cook ies("SCUser")(" Code")))
If SUserLogin.ID > 0 Then
Session("Logged In") = True
Session("User") = SUserLogin
Session("UserNa me") = SUserLogin.Nomb reCompleto
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!!!

Dec 12 '05 #2
TCB
Thank you, that seems to fix the Email sending problem, but the cookie
problem still persists, do i have to do something in particular so that
cookies work with my web app?

Thanks
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:uM******** ******@TK2MSFTN GP11.phx.gbl...
Check the version number of the .Net Framework 2.0 on your local machine
and on the server. It sounds like they are not exactly the same.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
You can lead a fish to a bicycle,
but you can't make it stink.

"TCB" <tc******@hotma il.com> wrote in message
news:O0******** ******@TK2MSFTN GP10.phx.gbl...
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.MailAd dress("po****@x xx.com",
"Portal XX.com")
Dim MyMailTo As New Net.Mail.MailAd dress("in**@xxx .com")
Dim MyMail As New Net.Mail.MailMe ssage(MyMailFro m, MyMailTo)
Dim MySMTP As New Net.Mail.SmtpCl ient("mail.xxx. com")

MyMail.Subject = "Web Contact"
MyMail.IsBodyHt ml = True
MyMail.Priority = Net.Mail.MailPr iority.High
MyMail.Body = "All the fields entered in the form"

MySMTP.Credenti als = New
Net.NetworkCred ential("po****@ xxx.com", "myacctpwd" )

Try
MySMTP.Send(MyM ail)
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.se t_Priority(Syst em.Net.Mail.Mai lPriority)'
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("Id Pais",
CType(Server.Ht mlEncode(Reques t.Cookies("SCCo untry")("Pais") ), Integer))
Else
If Session("IdPais ") <> 1 And Session("IdPais ") <> 2 Then
Response.Redire ct("SelCountry. aspx?RedirPage= " &
Request.Url.Abs oluteUri)
End If
End If

Dim SUserLogin As SC.Objects.Usua rio.s_SessionUs er

If Not Request.Cookies ("SCUser") Is Nothing Then
SUserLogin =
SC.Objects.Usua rio.LoginFromCo okie(Server.Htm lEncode(Request .Cookies("SCUse r")("Email") ),
Server.HtmlEnco de(Request.Cook ies("SCUser")(" Code")))
If SUserLogin.ID > 0 Then
Session("Logged In") = True
Session("User") = SUserLogin
Session("UserNa me") = SUserLogin.Nomb reCompleto
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!!!


Dec 12 '05 #3
You'll have to be more specific about the cookie problem. In our original
post you said:
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.

What exactly do you mean by "nothing happens?" Obviously, something happens.
So, can you describe what does happen, what should happen, and what the
problem is? A URL would help also.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but you can't make it stink.

"TCB" <tc******@hotma il.com> wrote in message
news:O7******** ******@tk2msftn gp13.phx.gbl... Thank you, that seems to fix the Email sending problem, but the cookie
problem still persists, do i have to do something in particular so that
cookies work with my web app?

Thanks
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:uM******** ******@TK2MSFTN GP11.phx.gbl...
Check the version number of the .Net Framework 2.0 on your local machine
and on the server. It sounds like they are not exactly the same.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
You can lead a fish to a bicycle,
but you can't make it stink.

Dec 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
14846
by: Aryeh M. Friedman | last post by:
If have something like the following declartion: enum foo {One,Two,....,Ten}; How do I determine how many elements (enumerations)... in this case it is obviously 10 but I don't want to hard code that fact --Aryeh
4
3136
by: Silas | last post by:
Hi, I use view to join difference table together for some function. However, when the "real" table fields changed (e.g. add/delete/change field). The view table still use the "old fields". Therefore everytimes when I change the real table, I also needed open the view table and save it by SQL enterprise manager manually for update the view table field.
30
2916
by: bblais | last post by:
Hello, Let me start by saying that I am coming from a background using Matlab (or Octave), and C++. I am going to outline the basic nuts-and-bolts of how I work in these languages, and ask for some help to find out how the same thing is done in Python. I am not sure what the standard is. In C++, I open up an editor in one window, a Unix shell in another. I write the code in the editor, then switch to the shell window for compile...
5
1880
by: engsolnorm | last post by:
I'm playing with a sudoku GUI...just to learn more about python. I've made 81 'cells'...actually small canvases Part of my scheme to write the cells (all 81 of them in the gui) to a file (using the the SAVE callback/button), then restore the gui cells from the contents of the saved file, which depends on knowing the "name" of the cell with the focus, or one (or more) which have a number. The print shows .9919624.9990312, but this...
71
3358
by: Jack | last post by:
I understand that the standard Python distribution is considered the C-Python. Howerver, the current C-Python is really a combination of C and Python implementation. There are about 2000 Python files included in the Windows version of Python distribution. I'm not sure how much of the C-Python is implemented in C but I think the more modules implemented in C, the better performance and lower memory footprint it will get. I wonder if it's...
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10199
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3700
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.