Reply
Code doesnt work on different servers
Old 11-06-2006, 03:55 PM Code doesnt work on different servers
Experienced Talker

Posts: 35
This may be a knumbskull question but to me its confusing. Okay I have IIS 5.0 running on my own machine and I created an Asp.Net C# web form that sends an email. I got the page to execute and run on my server but for some reason it doesnt run on my shared server Im paying for, which is an Asp.Net version1 equiped server. My code is written with asp.net1 as well but I dont understand why it doesnt work. What really gets me is theres only one line of code thats causing it to throw errors. Its a form, as mentioned above and there's a dropdown list. IF I remove the ddown list it works on the shared MS server.

I have no clue what steps to use to debunk the error because I cant see the compiler error, since its not my server. So in cases where you are trying to run code on someone elses server how do you see the errors in order to fix it? Im open to any suggestions at this particular juncture. Thanks in advance!
Turbo6PGT is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 11-20-2006, 11:38 AM Re: Code doesnt work on different servers
Average Talker

Posts: 23
Do you get any error code at all...or does it just not send out an email...it is posiable there is no SMTP server running on your shared server.
__________________
Free Gaming Websites
http://www.clansitemanager.com
News - Forums - Features
jayr1021 is offline
Reply With Quote
View Public Profile
 
Old 11-20-2006, 02:37 PM Re: Code doesnt work on different servers
Experienced Talker

Posts: 35
Im executing the script from the client side, not the server side. So I dont get compiler errors, just the default set for the server. On my own machine the code executes just fine of course it doesnt send the actual mail because the firewall doesnt let the smtp send. But at least it completes w/out errors on my own IIS server.
Turbo6PGT is offline
Reply With Quote
View Public Profile
 
Old 11-22-2006, 01:49 PM Re: Code doesnt work on different servers
chrishirst's Avatar
Super Moderator

Posts: 13,584
Location: Blackpool. UK
If you have IIS installed on your machine you are NOT running it client side.

Win 2K supports CDONTS & CDOSYS, Win2K3 only supports CDOSYS. Which are you using?

What is the error you are getting?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System

Last edited by chrishirst : 11-23-2006 at 02:55 AM. Reason: speeling errur
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-22-2006, 06:34 PM Re: Code doesnt work on different servers
Experienced Talker

Posts: 35
For some reason nobody is getting this. I HAVE TWO SERVERS! One is IIS on my personal machine, the other is a shared hosting server that I have my website posted. I can execute and run the code on MY machine, which is the server side of it because its IIS. When I publish the files to the shared asp.net1 server it will not run. I cant see the compiler errors because Im not executing from the server side. When I run the code on my machine it executes, so there is no error. So long and short, it errors on the shared server and executes on my IIS.
Turbo6PGT is offline
Reply With Quote
View Public Profile
 
Old 11-22-2006, 09:34 PM Re: Code doesnt work on different servers
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Turbo6PGT: I don't know THAT much about ASP.net (I prefer classic ASP), but if you're not seeing an error message that means something is severely misconfigured on your shared server.

By default, ASP.net spits out some weird ugly-looking error page with a yellow box in the middle and red and brown and black text on a white/yellow box background. The error information is there...you just need to know how to read it.

Where's the site uploaded publicly?

And by the way...everyone that answered your question "got it". You're getting client-side and server-side mixed up. Client-side code is anything the browser interprets (HTML, Javascript, etc.) Server-side code is the stuff that doesn't get outputted directly to the browser (e.g. your ASP.net code and the sending of the email.)

In the case of your IIS setup, the client is your browser and the server sounds like it's on the same machine. In the case of the hosted setup, the server is the server (****, that's redundant) and the client is still your browser.

So...they got it. You're the one that didn't. There's no need to go hollering at other people like that. They only tried to help.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 11-23-2006, 03:23 AM Re: Code doesnt work on different servers
chrishirst's Avatar
Super Moderator

Posts: 13,584
Location: Blackpool. UK
Ok then if we aren't "getting it" how about you helping us to "get it"

We may be experts at ASP but, we are NOT clairvouyant.

we have no idea what your code is.

we have no idea what mail component you are trying to use (see my previous post).

We don't know what OS or IIS version the server is running.

Lots of things we don't know there in the attempt to solve YOUR problem. Having a go at us for your code issues when you are "not getting it" is a little self defeating.

BTW you can see compiler errors from a server. You just need to set custom errors in web.config. See http://www.aspnetresources.com/artic...rrorPages.aspx

(thread flagged for moving to the .NET forum as well)
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-23-2006, 09:19 AM Re: Code doesnt work on different servers
Experienced Talker

Posts: 35
The server does give an error message, just not a useful one. Its like a deftaul error page for any file that cannot run/execute. For those who aren't .net people here's what it looks like:


Server Error in '/' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration


I didnt mean to get angry with anyone, it just seems like people keep asking me what the error is but I keep saying I cant see the error. If I cant see the compiler error (because you cant from the client side) there is nothing I can do to see why it's not running. I dont think the OS matters in this case, I believe it to be a potential server issue with which version they have. My system is just XP with IIS 5.0, the shared server is MS 2000 with the asp.net version1 packaged installed. I dont know enough about the dotnet Framework environment to talk to the server hosting company and ask them any kind of detailed questions.
Turbo6PGT is offline
Reply With Quote
View Public Profile
 
Old 11-23-2006, 11:02 AM Re: Code doesnt work on different servers
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Sure you do. If it works in one environment, and not in the other, then you should be able to ask them stuff. A good host would be able to help you.

Just tell them that it worked locally and not remotely and they should walk you through it.

Other than that, the only thing anyone here could suggest is what chrishirst did. There's a file called web.config somewhere on your remote server. Find it, download it, and add the <customErrors mode="off" /> tag to it somewhere and reupload it to the same spot.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 12-20-2006, 05:53 PM Re: Code doesnt work on different servers
Junior Talker

Posts: 3
Name: Andy
You probably have worked it out you problem by now , but if you modify your web.config file and change the <customErrors> tag to read <customErrors mode="Off"/> you will then get a more detailed and specific error number and description.

Remember to set it back though as I would not recommend setting this tag permantly as I provides quite a lot of information.
AndyWatt is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Code doesnt work on different servers
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.18857 seconds with 12 queries