|
Am getting "RPC Server is Unavailable" error .
Any solution
My application is ASP.net + c#
Sabari MD
Application Developer
Veloxit Info Solutions
|
|
|
|
|
Just google it.[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
I have three different ways to Instatiate a class and fill the properties.
Even though all three ways work I'm not sure which would be the best to use in the form "Best Practices"
Method 1
Simple instantiate class, set property and call select to fill object
Foo NewFoo = new Foo();
NewFoo.ID = 10;
NewFoo.Select();
Method 2
In constructor Set Id and then call Select to Fill Object
Foo NewFoo = new Foo(10).Select();
Method 3
In the construtor I use the ID and automatically call the Select to fill the Object
Foo NewFoo = new Foo(10);
All three are basically the same. If anyone does it differently or better.
Please let me know what your thoughts are.
Thanks.
|
|
|
|
|
I would use Method 4
Foo NewFoo = new Foo(10);
NewFoo.Select();
|
|
|
|
|
So basically Method 2.
I was kinda going with that.
Thanks.
|
|
|
|
|
Hi All,
i have a custom control like below.
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using System.IO;
using System.Collections.Specialized;
using System.Collections;
[assembly: TagPrefix("Tittle.Controls", "Tittle")]
namespace Tittle.Controls
{
#region Table Curve Panel Control (Expandable)
/// <summary>
/// Renders a tab control on page. i.e. A tabbed image on top of the table and you can have ur own contents in between that.
/// <example>
/// <code>
/// <Tittle:PanelCurveControl runat="server"
/// Expandable="true"
/// Width="500px"
/// Margin="10"
/// Title="Employees">
/// <table border=1>
/// <tr><td>test1</td><td>test2</td></tr>
/// <tr><td>test3</td><td>test4</td></tr>
/// </table>
/// </Tittle:PanelCurveControl>
/// </code>
/// </example>
/// <autor>Tittle Joseph (tittlejoseph@yahoo.com) India.</autor>
/// <url>http://www.codeproject.com/PanelCurveContainer/</url>
/// </summary>
[ToolboxData("<{0}:PanelCurveControl runat=server Expandable='true' id='tblCrvPnl' Width='200px'></{0}:PanelCurveControl>")]
public class PanelCurveControl : Panel, IPostBackDataHandler
{
private string skinName = ""; //"/BasicNuggetSkin";
private bool hasMinimize = true;
private bool hasPrint = true;
private string imgPath;
private Color bodyBackColor = Color.Transparent;
private string tabBackColor = "#99CCFF";
private string headerTextColor = "black";
public PanelCurveControl()
: base()
{
//imgPath = "/Images/";
}
/// <summary>
/// Makes the control expandable on demand,
/// Default: true
/// </summary>
[Browsable(true),
Category("Validation"),
DefaultValue("true"),
Description("Makes the control expandable on demand.")]
public bool Expandable
{
get { return Convert.ToBoolean(ViewState["Expandable"]); }
set { ViewState["Expandable"] = value; }
}
/// <summary>
/// Render the contents in the box
/// (used only if Expandable is false),
///
/// Expandable true makes tab disappear,
/// but if Expandable is false
/// RenderInBox is "true" shows border of container.
/// RenderInBox is "false" no border appears.
/// Default: false
/// </summary>
[Browsable(true),
Category("Misc"),
DefaultValue("false"),
Description("Render the contents in the box.")]
public bool RenderInBox
{
get { return Convert.ToBoolean(ViewState["RenderInBox"]); }
set { ViewState["RenderInBox"] = value; }
}
/// <summary>
/// Whether the contents of the expandable panel must be visible
/// Equivalent to "DefaultMinimize" attribute
/// Default: false
/// </summary>
[Browsable(true),
Category("Validation"),
DefaultValue("false"),
Description("Whether the contents of the expandable panel must be visible.")]
public bool Closed
{
get { return Convert.ToBoolean(ViewState["Closed"]); }
set { ViewState["Closed"] = value; }
}
/// <summary>
/// The text displayed as the caption of the expandable panel
///
/// Default: "Panel"
/// </summary>
[Browsable(true),
Category("Behavior"),
DefaultValue("Panel"),
Description("The text displayed as the caption of the expandable panel.")]
public string Title
{
get { return Convert.ToString(ViewState["Title"]); }
set { ViewState["Title"] = value; }
}
/// <summary>
/// The margin to use if the panel is expandable
///
/// Default: "2"
/// </summary>
[Browsable(true),
Category("Appearance"),
DefaultValue("2"),
Description("Margin to use if the panel is expandable.")]
public int Margin
{
get { return Convert.ToInt32(ViewState["Margin"]); }
set { ViewState["Margin"] = value; }
}
/// <summary>
/// SkinName to be used in nugget i.e. "BasicNuggetSkin", "BillInfoNuggetSkin", "DataGridNuggetSkin",
/// "TabbedNuggetSkin"
///
/// Default is "BasicNuggetSkin"
/// </summary>
[Browsable(true),
Category("Behavior"),
DefaultValue("BasicNuggetSkin"),
Description("Skinname to be used in nugget.")]
public string SkinName
{
get { return skinName; }
set { skinName = value; }
}
/// <summary>
/// Whether to show Minimize icon on screen or not.
///
/// Default: true
/// </summary>
[Browsable(true),
Category("Validation"),
DefaultValue("true"),
Description("Whether to show minimize icon on screen or not.")]
public bool HasMinimize
{
get { return hasMinimize; }
set { hasMinimize = value; }
}
/// <summary>
/// Whether to show Print icon on screen or not.
///
/// Default: true
/// </summary>
[Browsable(true),
Category("Validation"),
DefaultValue("true"),
Description("Whether to show Print icon on screen or not.")]
public bool HasPrint
{
get { return hasPrint; }
set { hasPrint = value; }
}
/// <summary>
/// Render it minmized by default or not
///
/// Default: false
/// </summary>
[Browsable(true),
Category("Appearance"),
DefaultValue("false"),
Description("Render it minimized by default or not.")]
public bool DefaultMinimize
{
get { return Closed; }
set { Closed = value; }
}
/// <summary>
/// Content Back Color
/// </summary>
public Color BodyBackColor
{
get { return bodyBackColor; }
set { bodyBackColor = value; }
}
/// <summary>
/// Top Tab Back Color
/// </summary>
public string TabBackColor
{
get { return tabBackColor; }
set { tabBackColor = value; }
}
/// <summary>
/// Top Header Text Color
/// </summary>
public string HeaderTextColor
{
get { return headerTextColor; }
set { headerTextColor = value; }
}
/// <summary>
///RaisePostDataChangedEvent::LoadPostData
/// Automatically updates the Closed property based on the content
/// of hidden field named as this control
/// </summary>
/// <param name="postDataKey"></param>
/// <param name="postCollection"></param>
/// <returns></returns>
public virtual bool LoadPostData(string postDataKey, NameValueCollection postCollection)
{
bool currentValueOfClosed = Closed;
bool postedValueOfClosed = Convert.ToBoolean(postCollection[postDataKey + "_hdnMinimizeState"]);
// What if the field is empty?
if (!currentValueOfClosed.Equals(postedValueOfClosed))
{
Closed = postedValueOfClosed;
return true;
}
return false;
}
/// <summary>
/// IPostBackDataHandler::RaisePostDataChangedEvent
/// </summary>
public virtual void RaisePostDataChangedEvent()
{
// Do nothing here
// No need of firing server-side events
}
/// <summary>
/// Fires when the panel gets loaded
/// </summary>
/// <param name="e"></param>
protected override void OnLoad(EventArgs e)
{
Expandable = true;
RenderInBox = false;
Title = "Panel";
Font.Name = "verdana";
Font.Size = FontUnit.Point(10);
Margin = 2;
Closed = false;
ForeColor = Color.Black;
BorderColor = Color.DodgerBlue;
imgPath = HttpContext.Current.Request.ApplicationPath + skinName + "/Images/";
base.OnLoad(e);
// Check the browser caps and disable collapse/expand if needed
bool uplevel = false;
HttpBrowserCapabilities caps = Page.Request.Browser;
if (caps.Browser.ToUpper().IndexOf("IE") > -1)
{
// This is IE. But is it at least v5?
if (caps.MajorVersion > 4)
uplevel = true;
}
// If the browser is not IE5 or higher, drop collapse/expand
if (!uplevel)
{
Expandable = false;
RenderInBox = true;
}
//Need to write this, so that LoadPostData() gets called.
Page.RegisterRequiresPostBack(this);
}
/// <summary>
/// Render the control
/// </summary>
/// <param name="output"></param>
protected override void Render(HtmlTextWriter output)
{
if (!Expandable)
{
if (!RenderInBox)
base.Render(output);
else
RenderContentsInBox(output);
return;
}
// Add margin information if the panel is expandable
Style["margin"] = Margin.ToString();
Style["display"] = (Closed ? "none" : "");
// The internal panel must cover 100% of the parent area
// irrespective of the physical width. We change this here
// so that the original Panel code doesn't reflect the
// external width.
Unit oldWidth = Width;
Width = Unit.Percentage(100);
//Add Hidden Field to maintain minimize/maximize state of the curve.
TextBox hdn = new TextBox();
hdn.Attributes.Add("style", "display:none");
//This is what created a big nuisance to me
if (this.UniqueID.IndexOf(":") >= 0)
hdn.ID = this.ID + "_hdnMinimizeState"; //Within some user control or grid //E.g. client id will be in this case "UserControl1__ctl0_tblCrvPnlControl2_hdnMinimizeState"
else
hdn.ID = this.UniqueID + "_hdnMinimizeState"; //Straight on aspx page, //E.g. client id will be in this case "tblCrvPnlControl1_hdnMinimizeState"
hdn.Text = Closed.ToString();
this.Controls.Add(hdn);
// Capture the default output of the Panel
StringWriter writer = new StringWriter();
HtmlTextWriter buffer = new HtmlTextWriter(writer);
base.Render(buffer);
string panelOutput = writer.ToString();
// Restore the wanted width because this affects the outer table
Width = oldWidth;
BuildControlTree(output, this.ClientID, panelOutput);
return;
}
// Handle the PreRender event
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
CreateClientScript();
}
/// <summary>
/// Build the markup for this custom Panel control
/// </summary>
/// <param name="output"></param>
/// <param name="id"></param>
/// <param name="panelOutput"></param>
private void BuildControlTree(HtmlTextWriter output, string id, string panelOutput)
{
Table t = new Table();
//t.ID = "thePanel";
t.ID = id + "_thePanel";
t.CellPadding = 0;
t.CellSpacing = 0;
t.Width = Unit.Percentage(100); //Width;
t.HorizontalAlign = HorizontalAlign.Center;
t.Style.Add("margin", "0 0 0 0px");
// Prepare the topmost row
TableRow rowTop = new TableRow();
// Leftmost cell
TableCell leftCell = new TableCell();
leftCell.HorizontalAlign = HorizontalAlign.Left;
leftCell.Style.Add("width", "10px");
leftCell.Style.Add("background", tabBackColor + " url(" + imgPath + "topleft.gif) top left no-repeat");
leftCell.Text = " ";
rowTop.Cells.Add(leftCell);
//Label Info
TableCell centerCell = new TableCell();
centerCell.Style.Add("background-Color", tabBackColor);
centerCell.Wrap = false;
centerCell.Attributes.Add("onselectstart", "return false"); //Not allowing user to select Tab Title text through mouse or double click.
if (hasMinimize == true)
centerCell.Attributes.Add("ondblclick", String.Format("javascript:MinMaxTableCurvePanel('{0}')", id));
Literal lit = new Literal();
lit.Text = String.Format("<P class=PanelCurveTitleStyle><font color='{1}'>{0} </font></P>", Title, headerTextColor);
centerCell.Controls.Add(lit);
rowTop.Cells.Add(centerCell);
//Print Icon Cell
if (hasPrint)
{
TableCell printCell = new TableCell();
//printCell.HorizontalAlign = HorizontalAlign.Right;
printCell.Style.Add("background-Color", tabBackColor);
printCell.Wrap = false;
printCell.Width = Unit.Pixel(20);
System.Web.UI.WebControls.Image imgPrint = new System.Web.UI.WebControls.Image();
imgPrint.AlternateText = "Print View";
imgPrint.BorderWidth = 0;
imgPrint.Style.Add("cursor", "hand");
imgPrint.Attributes.Add("onclick", String.Format("javascript:PrintTableCurvePanel('{0}')", id));
imgPrint.ImageAlign = ImageAlign.AbsMiddle;
imgPrint.ImageUrl = imgPath + "print.gif";
printCell.Controls.Add(imgPrint);
rowTop.Cells.Add(printCell);
}
//Minimize/Maximize Icon Cell
if (hasMinimize)
{
TableCell minimizeCell = new TableCell();
//minimizeCell.HorizontalAlign = HorizontalAlign.Right;
minimizeCell.Style.Add("background-Color", tabBackColor);
minimizeCell.Wrap = false;
minimizeCell.Width = Unit.Pixel(20);
System.Web.UI.WebControls.Image imgMinimize = new System.Web.UI.WebControls.Image();
//imgMinimize.ID = "img";
imgMinimize.ID = id + "_imgPlusMinus";
imgMinimize.AlternateText = "Minimize/Maximize the Panel";
imgMinimize.BorderWidth = 0;
imgMinimize.Style.Add("cursor", "hand");
imgMinimize.Attributes.Add("onclick", String.Format("javascript:MinMaxTableCurvePanel('{0}')", id));
imgMinimize.ImageAlign = ImageAlign.AbsMiddle;
imgMinimize.ImageUrl = imgPath + (Closed == true ? "plus.gif" : "minus.gif");
minimizeCell.Controls.Add(imgMinimize);
rowTop.Cells.Add(minimizeCell);
}
// Right most cell
TableCell rightCell = new TableCell();
rightCell.HorizontalAlign = HorizontalAlign.Right;
rightCell.Width = Unit.Pixel(10);
rightCell.Style.Add("width", "10px");
rightCell.Style.Add("background", tabBackColor + " url(" + imgPath + "topright.gif) top right no-repeat");
rightCell.Text = " ";
rowTop.Cells.Add(rightCell);
// Add the top row to the table
t.Rows.Add(rowTop);
int colspan = 3;
if (hasPrint)
colspan++;
if (hasMinimize)
colspan++;
// Insert the Panel's markup in the table cell {Container}
TableRow rowBody = new TableRow();
if (bodyBackColor != Color.Transparent)
rowBody.BackColor = bodyBackColor;
TableCell cellBody = new TableCell();
cellBody.ColumnSpan = colspan;
cellBody.Text = panelOutput;
cellBody.Style.Add("BORDER", "#cccccc 1px solid");
cellBody.Style.Add("padding", "0 0 0 0px"); //"0 5 5 5px"
cellBody.Style.Add("margin", "0 0 0 0px"); //"0 0 5 0px"
rowBody.Cells.Add(cellBody);
t.Rows.Add(rowBody);
// Output
t.RenderControl(output);
}
/// <summary>
/// Add client side scripting
/// </summary>
private void CreateClientScript()
{
string jscript = @"
<style>
P.PanelCurveTitleStyle
{
font-family:verdana;
font-size: 12px;
font-weight : bold;
text-align: center;
}
</style>
<script language=javascript>
var imgPath='" + imgPath + @"';
</script>
<script language=javascript>
function MinMaxTableCurvePanel(cntrlId)
{
//Get state from hidden control.
var closed_TableCurvePanel = document.getElementById(cntrlId+'_hdnMinimizeState').value;
if ( closed_TableCurvePanel.toLowerCase() == 'true' )
{
document.getElementById(cntrlId).style.display = '';
document.getElementById(cntrlId+'_hdnMinimizeState').value=false;
document.getElementById(cntrlId+'_imgPlusMinus').src = imgPath + 'minus.gif';
}
else
{
document.getElementById(cntrlId).style.display = 'none';
document.getElementById(cntrlId+'_hdnMinimizeState').value = true;
document.getElementById(cntrlId+'_imgPlusMinus').src = imgPath + 'plus.gif';
}
}
//TODO: this could be improved further to show tab on new window.
function PrintTableCurvePanel(cntrlId)
{
var objDiv = document.getElementById(cntrlId);
var winTableCurvePanel = window.open('','winTableCurvePanelId','');
winTableCurvePanel.document.write('<html><head><title>Print</title></head><body onload=\'javascript:window.print()\'>');
winTableCurvePanel.document.write(objDiv.innerHTML);
winTableCurvePanel.document.write('</body></html>');
winTableCurvePanel.focus();
}
</script>
";
if (!Page.IsClientScriptBlockRegistered("TableCurvePanel_Script"))
Page.RegisterClientScriptBlock("TableCurvePanel_Script", jscript);
}
/// <summary>
/// Render the panel in a box (MSDN like)
/// </summary>
/// <param name="output"></param>
private void RenderContentsInBox(HtmlTextWriter output)
{
this.Style.Add("BORDER", "#cccccc 1px solid");
this.Style.Add("padding", "0 0 0 0px"); //"0 5 5 5px"
this.Style.Add("margin", "0 0 0 0px"); //"0 0 5 0px"
base.Render(output);
}
}
#endregion
}
Now i want to implement idatasource interface into this class.
like below
public class PanelCurveControl : Panel, IPostBackDataHandler,iDataSource
Can anybody help how to implement getview and getviewnames methord of idatasource interface.
|
|
|
|
|
hi there,
i m working on a page that contains a google ad and other server controls
the problem is that when i m placing google ad server control doesn't works
or their events are not called
|
|
|
|
|
In web project application just created I added some class to App_Code folder by means of Solution explorer.
It resides in the same namespace as the web project one.
But from default.aspx.cs I can not access that class reporting error that the object is not defined? but it is in the same namespace and should be visible as in C# projects.
App_Code\SomeClass.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
namespace SomeNameSpace
{
[Serializable]
public class SomeClass
{
public SomeMethod { ... }
}
}
default.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
namespace SomeNameSpace
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SomeClass sc = new SomeClass();
}
}
}
Error: The type or namespace name 'SomeClass' could not be found (are you missing a using directive or an assembly reference?)
Чесноков
|
|
|
|
|
Remove the Namespace from both .cs and aspx.cs .... It ll work
|
|
|
|
|
actually not a good idia to remove them. but even in that case it fails
Чесноков
|
|
|
|
|
Try this.
First Create a class in App_Code,like the below
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public class Class1
{
public Class1()
{
}
public string test()
{
return "Test";
}
}
and create the object for that class in default.aspx.cs, like
Class1 cls = new Class1();
and call the function "Test" in default.aspx.cs
string str = cls.test();
Regards,
Karthik K...
|
|
|
|
|
Without any contructors when you type in SomeClass inside default.aspx.cs it is absent in the list of objects available.
Adding constructor does not help. Still the simple declaration of object is forbidden. It is not visible from .aspx.cs
Чесноков
|
|
|
|
|
Chesnokov Yuriy wrote: but it is in the same namespace and should be visible as in C# projects.
Yes,it will work.
Check the namespace. Is it same? May be bymistake you have used different namespaces .Just check that..
himanshu
|
|
|
|
|
Just Create a new ASP.Net project you ll not get any namespace.
ASP.Net .cs files Namespace is not required.
|
|
|
|
|
freshers wrote: Just Create a new ASP.Net project you ll not get any namespace.
Yup that i know..
But still you can manually add namespace to you page
himanshu
|
|
|
|
|
May i know the Need of It
|
|
|
|
|
|
the namespaces are all the same.
even if I change SomeClass.cs embedded in another namespace, that one also is not visible, even in intelligent help. I can not access SomeClass.cs object in any case??
Чесноков
|
|
|
|
|
it needed to change 'BuildAction' property of SomeClass.cs to 'Compile'
Чесноков
|
|
|
|
|
I am using membership provider DB created using ASP.NET configuration. working fine on my machine.
I after deploying I get the below error when I click login button
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I get Error 26 when I try to run a SqlCommand object referencing the same connection string, but the membership provider works properly.
Is that I need to install sql server on the server or .NET frame work will takcare of it,
I am new to ASP.NET programming/ deploying please help me
|
|
|
|
|
The membership provider DB will be stored in SQL Server. Therefore you need to have SQL Server in the deployed server. Also change your membership provdier connection string details accordingly in the web.config.
|
|
|
|
|
Hi all,
Am trying to send an email from my asp.net page.
Am using 5 textboxes and a button.
Following is my code ,
After clicking the submit button it is displaying that mail sent successfully.
How to ensure that mail has been reached.In my gmai maibox no msg was there.
Can anybody tell me.??
Submit Button click event
Dim tc, cc, bcc, subject, body As String
tc = _txtTo.Text
cc = _txtFrom.Text
bcc = _txtBCC.Text
subject = _txtSubject.Text
body = _txtMessage.Text
Dim status As Integer = sendMail(tc, cc, bcc, subject, body)
If (status = 1) Then
Response.Write("your mail has been sent successfully")
Else
Response.Write("sorry! your mail could not be sent�")
End If
My sendMail fuction
Private Function sendMail(ByVal tc As String, ByVal cc As String, ByVal ccc As String, ByVal subject As String, ByVal body As String) As Integer
Try
SmtpMail.SmtpServer = "localhost"
Dim msg As MailMessage = New MailMessage
msg.From = "mymail@gmail.com"
msg.Cc = cc
msg.Bcc = ccc
msg.Subject = subject
msg.Body = body
SmtpMail.Send(msg)
Return 1
Catch ex As Exception
Return 0
End Try
End Function
kissy
|
|
|
|
|
Hi,
calling SmtpMail.Send just passes the message to your smtp-server (localhost in your case). This doesn't say anything about if the mail was "physically" send to gmail. You have to check if your smtp-server has trouble sending the mail to gmail. Have a look in the queues of your smtp-server (can be found under inetpub). Then check for errors in the event log. It could also be that gmail doesn't allow that messages are sent to them by your smtp-server (for security reasons).
Let me know if you need some further help.
Regards
Sebastian
|
|
|
|
|
Thanks for ur prompt reply.
Ya under inetpur,my mail messages were with msg icon.
then form here what i have to do,so that i can send mail to any mail account of the user?
Please dont feel trouble let me know how can i send msgs from my asp.net page.
please....
kissy
|
|
|
|
|
Hi All
I have a web application in asp.net 1.1 and sql server 2000, it was running alright previously, but for some weeks users are reporting that they are facing error.
In the application whenever any error comes , user is being redirected to an error page and the actual error message comes to our(the programmers) email.
The error message is very long but I'll mention the important part:-
In the email :-
System.NullReferenceException: Object reference not set to an instance of an object. at CBSolutions.ETH.Web.newlook.VSPage.LoadPageStateFromPersistenceMedium() at System.Web.UI.Page.LoadAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The code for function CBSolutions.ETH.Web.newlook.VSPage.LoadPageStateFromPersistenceMedium() is :-
protected override object LoadPageStateFromPersistenceMedium()
{
if (ConfigurationSettings.AppSettings["ServerSideViewState"].ToUpper() == "TRUE")
{
string VSKey;
VSKey = Request.Form["__VIEWSTATE_KEY"];
if (!(VSKey.StartsWith("VIEWSTATE_")))
{
throw new Exception("Invalid VIEWSTATE Key: " + VSKey);
}
if (ConfigurationSettings.AppSettings["ViewStateStore"].ToUpper() == "CACHE")
{
return Cache[VSKey];
}
else
{
DataTable VsDataTable;
DataRow DbRow;
VsDataTable = ((DataTable) Session["__VSDataTable"]);
DbRow = VsDataTable.Rows.Find(VSKey);
// if (DbRow!=null)
// {
// throw new Exception("VIEWStateKey not Found. Consider increasing the ViewStateTableSize parameter on Web.Config file.");
// }
return DbRow["VsData"];
}
}
else
{
return base.LoadPageStateFromPersistenceMedium();
}
}
Also in the Event Viewer application log, the following warning appears:-
Event code: 3005
Event message: An unhandled exception has occurred.
.
.
.
.
.
Thread information:
Thread ID: 6
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Web.HttpServerUtility.MapPath(String path)
at ETH.Global.Session_End(Object sender, EventArgs e)
Here ETH.Global.Session_End(Object sender, EventArgs e) is written in Global.asax which is as follows:-
protected void Session_End(Object sender, EventArgs e)
{
//clean up temporary files
string[] files = System.IO.Directory.GetFiles(Server.MapPath("Files/"),"WF-" + Session.SessionID + "*.*");
for(int i=0;i<files.Length;i++)
System.IO.File.Delete(files[i]);
Response.Redirect("default.aspx");
}
Also, the server has Windows Server 2003.Also some weeks back server was updated to Sql Server SP4.
Any help is appreciated.
Thanks
Raj
|
|
|
|
|