i am find some error in my server runing code! how to finD best solution
string conn =
ConfigurationManager.ConnectionStrings["appConnection"].ConnectionString;
pllz any one can solve my problem
thanks
Server Error in '/' Application.
------------------------------
*Object reference not set to an instance of an object.* * Description: *An
unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error
and where it originated in the code.
* Exception Details: *System.NullReferenceException: Object reference not
set to an instance of an object.
*Source Error:*
Line 14: {
Line 15: SqlConnection con = new SqlConnection();
Line 16: string conn =
ConfigurationManager.ConnectionStrings["appConnection"].ConnectionString;
Line 17: protected void Page_Load(object sender, EventArgs e)
Line 18: {
* Source File: * c:\inetpub\vhosts\vdnext.com\httpdocs\Default.aspx.cs*
Line: * 16
*Stack Trace:*
[NullReferenceException: Object reference not set to an instance of
an object.]
DashbordHome..ctor() in
c:\inetpub\vhosts\vdnext.com\httpdocs\Default.aspx.cs:16
ASP.default_aspx..ctor() in
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\76234fdf\841788f2\App_Web_prgugeem.0.cs:0
__ASP.FastObjectFactory_app_web_prgugeem.Create_ASP_default_aspx()
in c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\76234fdf\841788f2\App_Web_prgugeem.4.cs:0
System.Web.Compilation.BuildResultCompiledType.CreateInstance() +32
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath
virtualPath, Type requiredBaseType, HttpContext context, Boolean
allowCrossApp, Boolean noAssert) +119
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext
context, String requestType, VirtualPath virtualPath, String
physicalPath) +33
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext
context, String requestType, VirtualPath virtualPath, String
physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context,
String requestType, VirtualPath path, String pathTranslated, Boolean
useAppConfig) +160
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+93
System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously) +155
------------------------------
*Version Information:* Microsoft .NET Framework Version:2.0.50727.3053;
ASP.NET Version:2.0.50727.3053
--
A Door knocks twice. insider asks--who is there... ans was : its OPPOTUNITY"
insider tels ,you are wrong becouse oppotunity never knocks twice
रात यों कहने लगा मुझसे गगन का चाँद,
आदमी भी क्या अनोखा जीव होता है!
,उलझनें अपनी बनाकर आप ही फँसता
और फिर बेचैन हो जगता, न सोता है।