Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers
Go Back  Xtreme Visual Basic Talk > > > Debugging on IDE working fine but functions do not work on dev/prod servers


Reply
 
Thread Tools Display Modes
  #1  
Old 05-26-2011, 09:50 AM
alexsts alexsts is offline
Freshman
 
Join Date: Apr 2010
Posts: 32
Thumbs down Debugging on IDE working fine but functions do not work on dev/prod servers


Hey guys.
Something weird going on.
I have web app ruining on build in dev environment.(NET 3.5 SP1 on IIS 6, OS 2003)
No problem and it does what it should do.
But as soon as I move it to regular dev server or QA server it no longer doing what it should do.
For example I have page redirect setup on code behind.
Works fine in debug mode. As soon as I move files to regular dev server- no go.
It throw regular error 404 instead of redirecting to a proper page.
Why it is working on build in web server in IDE but not on actual web server?
Any idea how to fix this?
Thanks
Reply With Quote
  #2  
Old 05-26-2011, 10:11 AM
PlausiblyDamp's Avatar
PlausiblyDampDebugging on IDE working fine but functions do not work on dev/prod servers PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Are there any errors being raised on the server at all? Are the files in the same place on production / are you redirecting based on the correct url / path?
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #3  
Old 05-26-2011, 10:17 AM
alexsts alexsts is offline
Freshman
 
Join Date: Apr 2010
Posts: 32
Default

yes, structure exactly the same and no errors getting raised.
Except that instead of loading page from the redirect function server goes to standard 404 page.
Path for redirect works just fine in IDE (debugging was perform for all possible permutation of the files name and extension) but on regular IIS same function does not work at all.
Reply With Quote
  #4  
Old 05-26-2011, 10:27 AM
PlausiblyDamp's Avatar
PlausiblyDampDebugging on IDE working fine but functions do not work on dev/prod servers PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Are any errors getting logged on the server? Does the server have the same web.config file as the development box?
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #5  
Old 05-26-2011, 10:47 AM
alexsts alexsts is offline
Freshman
 
Join Date: Apr 2010
Posts: 32
Default

web configs exactly the same.
No errors in IIS log directory.
Reply With Quote
  #6  
Old 05-26-2011, 10:50 AM
alexsts alexsts is offline
Freshman
 
Join Date: Apr 2010
Posts: 32
Default

Actually I am running IDE from the same folder as IIS.
Only difference that IDE running on http://localhost:2806 or some other port which IDE assign automatically during debug-- and IIS on http://localhost
Reply With Quote
  #7  
Old 05-26-2011, 11:03 AM
PlausiblyDamp's Avatar
PlausiblyDampDebugging on IDE working fine but functions do not work on dev/prod servers PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

When you get the 404 are you being redirected to the place you think you are? If you are using IIS to log requests then the 404 should show in the log file along with the url it attempted to access.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #8  
Old 05-26-2011, 11:12 AM
alexsts alexsts is offline
Freshman
 
Join Date: Apr 2010
Posts: 32
Default

Here is entry from log file:

2011-05-26 17:09:20 W3SVC1963627853 NYCWK7177 127.0.0.1 GET /opportunities63.php - 80 - 127.0.0.1 HTTP/1.1 Mozilla/5.0+(Windows+NT+5.2;+rv:2.0.1)+Gecko/20100101+Firefox/4.0.1 __utma=111872281.1946773028.1305911680.1306413654.1306428875.22;+__utm z=111872281.1305911680.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(non e);+ASP.NET_SessionId=3ethbn55o20xqe55braocw55;+__utmc=111872281;+__ut mb=111872281.8.10.1306428875 - localhost 404 0 0 5220 610 46

Instead of 404 it should been redirected to certain ASPX page.
And in IDE it does exactly that.
Reply With Quote
  #9  
Old 05-26-2011, 11:41 AM
PlausiblyDamp's Avatar
PlausiblyDampDebugging on IDE working fine but functions do not work on dev/prod servers PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

How are you handling the redirect on the server side?
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #10  
Old 05-26-2011, 11:52 AM
alexsts alexsts is offline
Freshman
 
Join Date: Apr 2010
Posts: 32
Default

Here is a snippet of the code for redirect:
======================
string RedirectTo = "";
string PandQ = HttpContext.Current.Request.Url.PathAndQuery.ToLower();
switch (PandQ)
{
case "/profile72.php":
PandQ = "profiles.aspx?id=2";
break;
case "/profile76.php":
PandQ = "profiles.aspx?id=6";
break;
case "/profile74.php":
PandQ = "profiles.aspx?id=4";
break;
case "/profile71.php":
PandQ = "profiles.aspx?id=1";
break;
case "/profile79.php":
PandQ = "profiles.aspx?id=9";
break;
case "/profile78.php":
PandQ = "profiles.aspx?id=8";
break;
case "/profile73.php":
PandQ = "profiles.aspx?id=3";
break;
case "/profile75.php":
PandQ = "profiles.aspx?id=5";
break;
case "/opportunities.php":
PandQ = "jobs.aspx";
break;
case "/benefits.php":
PandQ = "benefits.aspx";
break;
case "aboutus.php":
PandQ = "about-us.aspx";
break;
case "/opportunities62.php":
PandQ = "distribution-centers.aspx";
break;
case "/opportunities63.php":
PandQ = "retail-stores.aspx";
break;
}
RedirectTo = PandQ;
.
.
.
.
.
Server.Transfer(RedirectTo);


====================



Obviously it is a part of the function which called upon page initializes/load.
Reply With Quote
  #11  
Old 05-26-2011, 12:22 PM
PlausiblyDamp's Avatar
PlausiblyDampDebugging on IDE working fine but functions do not work on dev/prod servers PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

So where is this code executing on the server side? I am just curious as to how it gets called given the pages the browser is pointing to don't exist.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #12  
Old 05-26-2011, 01:54 PM
alexsts alexsts is offline
Freshman
 
Join Date: Apr 2010
Posts: 32
Default

Yes, it is on server side.
As soon as any page initialized it calls for base file where pages get identified or error get thrown.
If error get thrown then function figure out if page does not exists or it had to be redirected.
In case if it had to be redirected there are live pages from switch clause, if it is not there--then it is real 404.
As I mentioned in my original posting in IDE debug all works fine but on live IIS it does not.
I need to figure out why.
IDE is a standard VS 2008 installation with SP1. NO any additional configuration was made.
Same goes for IIS- IIS6. Stand alone site with standard configuration.
Reply With Quote
  #13  
Old 05-26-2011, 05:31 PM
PlausiblyDamp's Avatar
PlausiblyDampDebugging on IDE working fine but functions do not work on dev/prod servers PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

I am still unsure how your code gets executed when a request for a non-existent page is made. If the end user requests one of the pages you are trying to redirect then this eill happen before any .Net code gets the chance to execute.

You might want to check if IIS is configured the same on both the production and dev servers in regards to handling 404 errors. I can't see how your code is currently expected to be executed when it relies on the end user navigating to pages that aren't Asp.Net pages.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #14  
Old 05-27-2011, 06:42 AM
alexsts alexsts is offline
Freshman
 
Join Date: Apr 2010
Posts: 32
Default

IIS configured to show custom 404,403,500 pages which is actually part of the same project.
That is why I can execute code in base page if/when error get raised. Isn't it obvious?
As I mentioned earlier configuration and file locations (drive wise) exactly the same.
I even run windiff to see if there is any difference between files in any of locations where dev, prod servers run off.
What puzzled me is why it is working on IDE and not on the regular IIS.
Reply With Quote
  #15  
Old 05-27-2011, 07:09 AM
alexsts alexsts is offline
Freshman
 
Join Date: Apr 2010
Posts: 32
Default

Funny things that I posted same question on few other sites monitored by Microsoft staff.
All my postings was either moved to unrelated, rarely visited by anyone, topics by MSFT reps or removed completely from forums without any explanation!
Reply With Quote
  #16  
Old 05-27-2011, 08:13 AM
PlausiblyDamp's Avatar
PlausiblyDampDebugging on IDE working fine but functions do not work on dev/prod servers PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Quote:
IIS configured to show custom 404,403,500 pages which is actually part of the same project.
That is why I can execute code in base page if/when error get raised. Isn't it obvious?
If it was obvious I wouldn't have asked, after all you never explicitly stated this anywhere in your posts and this would have been a good cause of the problem you are seeing.

I am assuming that IIS is configured the same in both the development and production environments then? i.e. the customer error pages are setup the same and configured as such. Does the production website work if you access a .Net page that does exist?

What is the name of the page that 404 errors redirect to?

If you are relying on people browsing to non-existent pages then you might want to investigate the idea of Routes or Url Rewriting rather than relying on 404 errors.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #17  
Old 05-27-2011, 08:31 AM
alexsts alexsts is offline
Freshman
 
Join Date: Apr 2010
Posts: 32
Default

Sorry for confusion.
Yes pages load as it should. If I hit page which not actually exists it open my custom error pages.
I can not rely on Routes --routing does not handle requests that map to an existing physical file on the Web server.
Url Rewriting have no use to me for simple reason- lot of search engines have cached old pages. We are working with way to many websites to do custom config for each.
I use to do it in classic ASP(VB Script and it did work right away) in NET -- 404.aspx pages working fine in IDE and any prod/dev server.
Only functions which does not work is redirect in dev/prod servers but working as they should in IDE.

Last edited by alexsts; 05-27-2011 at 08:47 AM.
Reply With Quote
  #18  
Old 05-27-2011, 09:55 AM
PlausiblyDamp's Avatar
PlausiblyDampDebugging on IDE working fine but functions do not work on dev/prod servers PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

If you enable tracing on the site and put a Trace.Write(....) at the start of this method in the 404.aspx does the method seem to get executed at all?
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #19  
Old 05-27-2011, 10:32 AM
alexsts alexsts is offline
Freshman
 
Join Date: Apr 2010
Posts: 32
Default

Yes it does in Application_BeginRequest, but only while app ruining on build in web server in IDE.
ON localhost it does not do a squad, like functionality does not exists.
Reply With Quote
  #20  
Old 05-27-2011, 10:33 AM
alexsts alexsts is offline
Freshman
 
Join Date: Apr 2010
Posts: 32
Default

I probably should of mentioned that all routines live in global.asax and default.master files...
global.asax file fired up as soon as request received by IIS (Application_BeginRequest) for our application and default.master is a template referenced in all our aspx files.
Reply With Quote
Reply

Tags
debug, debug vs prod, functions, web server


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers
 
Debugging on IDE working fine but functions do not work on dev/prod servers
Debugging on IDE working fine but functions do not work on dev/prod servers
 
-->