Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > CMServer General > Application Sta...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 10649 of 10773
Post > Topic >>

Application Start up Issue on Production Server

by =?Utf-8?B?YW5raXQuc3Jp?= <ankit.sri@[EMAIL PROTECTED] > Jun 12, 2008 at 08:24 PM

Hi,
I have a issue deploying a MCMS based webapplication  which is developed
in 
Asp.net 2.0 on the Production box, the issue is :There is a customized 
configuration XML which is residing under the app_data of the application
and 
I have written a code for Write certain root names of that custom XML on
the 
Application start up on Global.asax.cs file to override certain Root Names

when the application starts up it works fine on the Development Machines
but 
when put on to the Production box it Shows an Error page for the first
time 
when the home page gets loaded and after that it works fine and the same 
scenario does not brings any issue on the Development Machine, its just I
am 
rewriting Custom XML File on the App_Data folder, is there anything which 
needs to be done on the WebServer or the Configuration ? Following is the 
code I am using to Update the XML file on the App_data of the Application 
written on Application_Start of global.asax.cs

 System.Web.HttpContext httpContext = System.Web.HttpContext.Current;
        string strFilePath = 
System.Web.HttpContext.Current.Request.ApplicationPath;
        string strNewFile;
        strFilePath += "/App_Data/";
        strNewFile = strFilePath + "CustomWebConfig.xml";
        string strReplace = 
System.Configuration.ConfigurationManager.AppSettings["root_channel_name"];
        strReplace = "/" + strReplace + "/";

        XmlDo***ent xmlDoc = new XmlDo***ent();
        XmlDo***ent xmlDocNew = new XmlDo***ent();

        xmlDoc.Load(httpContext.Server.MapPath(strFilePath + 
"CustomWebConfigTemplate.xml"));

        XmlNodeList nodeList = xmlDoc.SelectNodes("Key/Keys");

        for (int i = 0; i < nodeList.Count - 1; i++)
        {
            nodeList[i].Attributes["Value"].Value = 
nodeList[i].Attributes["Value"].Value.Replace("/{-1}/", strReplace);
        }
        xmlDoc.Save(httpContext.Server.MapPath(strNewFile));

-- 
A fundamental rule in technology says whatever can be done will be done
 




 2 Posts in Topic:
Application Start up Issue on Production Server
=?Utf-8?B?YW5raXQuc3Jp?=   2008-06-12 20:24:00 
Re: Application Start up Issue on Production Server
=?Utf-8?Q?Stefan_Go=C3=9F  2008-06-13 12:06:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Dec 4 15:04:23 CST 2008.