Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 09, 2012 11:49 AM by Ruchira
Dec 07, 2012 08:57 AM|LINK
I have a website that works perfectly when deployed on my local machine, but when it is deployed, it doesn't. It is being deployed on a testing server that I can't debug on, so what checks can I do to see what's happening?
I've tried changing all references in my local web.config to the IP address of the test server, to access the database there, but I'm not sure which ones need to be changed - ie. should any refence to 'localhost' in my local web.config be changed to the
IP address of the test server in order to enable me to use the database attached to it? (this is for CRM, so when I say database, I mean CRM really - there isn't a connection string tag in the web.config)
Dec 07, 2012 09:29 AM|LINK
I am not familiar with CRM but when you tell its not working, is it showing any error message or not showing any thing for the web site. Did you set customErrors mode = Off in the web.config.
Try it so it might show you what is the error and where is it coming from.
Hope this helps.
Dec 07, 2012 09:45 AM|LINK
Thanks for your reply.
I can't see any errors. What happens is that the user picks 2 values from 2 drop downs, then these values are saved to the database. However, the values are not being saved. When I refresh the page, they are not there, and they are not in the database.
I checked the web.config, and customErrors mode = Off.
The code is working perfectly on my local machine, the logic is correct etc. and the values are correctly saved to my local database. However, something must be going wrong somewhere when it is deployed to the test server as these values aren't saved. I
would like to somehow debug while pointing at the database of the test server. I can't debug the code locally on the test server.
Dec 07, 2012 10:36 AM|LINK
I never thought its possible to debug code from server. What I do in this situation is write messages to Windows event viewer to know which code path is executing. So you can place a message before inserting the values and print the values and what is happinging
after te insert or its going to any error.
Check this link for information about logging in to event viewer
Place meaning full messages so you can see the exact problem. Also provide your code which is failing the insertion on the forum so others can also see what wrong in it. As you told its only problem with insertion, I feel its some thing to do with your database
or insertion process.
Dec 09, 2012 11:49 AM|LINK
You have two options.
1. You can enable remote debugging in live server
2. You can configure a logging mechanism such as log4net and see where the error occurs. My blog post will help you to configure log4net.
Please 'Mark as Answer' if this post helps you.