|
Thanks for the reply..
Yeah the problem occurs for a specific call in a perticular page...
This call is getting failed only for some users ....
We never got this issue in the QA. But in the production very few users are having this problem.
At our end we are not able to reproduce the issue.
The service that we are calling is third party. There they are saying that they are not getting any request ..
Request is getting failed ....
We are not sure what can be the issue to fix it
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Well, the problem is with one particular page, one service, maybe one particula webMethod?
Maybe the users with problem has the same work to do, so only them use that part of the webService, that could explain why only they are being affected.
In order to reproduce the bug, you must identifi the webMethod (or methods) and send the same information than the user are sending to receive the same answer from the service.
|
|
|
|
|
Rolcr wrote: the problem is with one particular page, one service, maybe one particula webMethod?
Exactly, only for one perticual webmethod we are facing this issue and only for some users ....
Rolcr wrote: In order to reproduce the bug, you must identifi the webMethod (or methods) and send the same information than the user are sending to receive the same answer from the service.
We knew the WebMethod. and we send the same information data the users are sending and we were able to send that information ...
Thats the problem we are not able to replroduce the issue....
We know issue is there as we are seeing exceptions in the production log
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
|
swetha sankaran wrote: public string RetrieveDataSource()
Remove the brackets.
|
|
|
|
|
Got past the "get" error...I get object reference not set to an instance of an object while trying to render the string within a toolpart.
<br />
public string RetrieveDataSource<br />
{ <br />
get<br />
{ <br />
System.Data.Sql.SqlDataSourceEnumerator en = System.Data.Sql.SqlDataSourceEnumerator.Instance;<br />
DataTable dt = en.GetDataSources();<br />
RegistryKey rk = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft SQL Server");<br />
String[] instances = (String[])rk.GetValue("InstalledInstances");<br />
<br />
if(instances.Length > 0)<br />
{<br />
foreach(string element in instances)<br />
{<br />
if(element != "MSSQLSERVER")<br />
{serverName = String.Format(System.Environment.MachineName,element);}<br />
else<br />
{serverName = System.Environment.MachineName;}<br />
<br />
}<br />
<br />
}<br />
return serverName;<br />
}<br />
<br />
}<br />
<br />
protected override void RenderToolPart(System.Web.UI.HtmlTextWriter output)<br />
{<br />
base.RenderToolPart(output);<br />
if (ex1 != "")<br />
{<br />
output.Write(ex1);<br />
}<br />
output.Write(this.RetrieveDataSource); <br />
<br />
}
Any idea as to why it is happening. Is this a NullReferencException?
Thanks.
Swetha Sankaran
|
|
|
|
|
Its the logic or coding issue it seems ..
Best part is debug and see which object is not initialized or is null
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
String[] instances = (String[])rk.GetValue("InstalledInstances");<br />
<br />
output.Write(this.RetrieveDataSource); <br />
Are the two places wehre the error seems to be happening.
Swetha
|
|
|
|
|
Hi
i have a grid and want to allow paging for my custom object stored in a list... the list has 1000 records and i want to show 50 per page... I did the following
gridview.allowpaging=true;
gridview.pagesize=50;
gridview.datasource=mylist;
currentlist=mylist;
gridview.databind();
it works fine on the first time... when somebody clicks page 2, i called pageindexchanging event and added
{
grid1.PageIndex = e.NewPageIndex;
grid1.DataSource = currentList;
// grid1.DataSource=list
grid1.DataBind();
}
the grid isn't shown at all... i get an empty page... wat should i do;
please provid help
thanx in advance
haseeb
|
|
|
|
|
Check to ensure that there is data in your dataset. It could be that when you postback that your dataset is being wiped.
Are you storing your currentList in the ViewState?
Cheers
Disgyza
Programmer Analyst
|
|
|
|
|
yeah... ur right, my list becomes emptied up because of state issue, but my list is 2000 columns, storing that much data for every user , isn't that a bad idea?
is viewstate created per user, each user will have own viewstate or do i have to save to someother place
thanx...
haseeb
|
|
|
|
|
There are several ways you can do this, each have pro's and con's.
1. You can query the database and return your records for each time the event handler fires. This can be an issue on performance if you have a lot of records being returned. (multiply this by each user using the system).
2. You can set up special queries to return only a set amount of records (only the data grid's page size) this is a better approach because it returns only the records you want to show the user.
3. You can save the information to ViewState, the ViewState stores information about the page using the browsers memory. It has more of a performance hit on the client, instead of the server.
My suggestion if there are a lot of records would be to use option 2.
I'm sure there are quite a few more ways in which this can be accomplished... the easiest way would be to just query the database each time the event fires... but this has performance issues.
Try it out and see what works best for your situation.
Best of luck,
Cheers
Disgyza
Programmer Analyst
|
|
|
|
|
thanx... for this beautiful answer...
i think you are right,i should use option 2, gridview paging ... though , it is not gonna be that easy. and yeah... can u please help me one more thing, i am confused regarding view state, somebody told me that view state is not created for each user, so if ur using sessions, u should not be using viewstate... i thought each session has separate viewstate...
thanx alot...
take care
haseeb
|
|
|
|
|
Hi, I have 3 .resx file, its using for language. For PrecompiledWeb;
I convert "Resource.en.resx" to "Resource.en.resources" using with ResGen.exe.
I convert "Resource.en.resources" to "App_GlobalResources.resources.dll" using with al.exe.
I do this operation for turkish and russian languages. So I have 3 App_GlobalResources.resources.dll for each language.
I paste this dll file in relevant directory. For example; ....\bin\en-US\
But I browse the web site it's not work. May be I merge this file using with aspnet_merge.exe and I get App_GlobalResources.dll but how I don't know.
How do solve my problem?
Not: I check "Allow this precompiled site to be updatable" when publish web site.
MY CODE USING ResGen.exe
------------------------
ResGen.exe en-EN/Resource.en.resx Resource.en.resources
ResGen.exe ru-RU/Resource.ru.resx Resource.ru.resources
ResGen.exe tr-TR/Resource.tr.resx Resource.tr.resources
MY CODE USING al.exe
--------------------
al.exe /nologo /t:lib /embed:Resource.en.resources /culture:en-US /out:en-EN/App_GlobalResources.resources.dll
al.exe /nologo /t:lib /embed:Resource.ru.resources /culture:ru-RU /out:ru-RU/App_GlobalResources.resources.dll
al.exe /nologo /t:lib /embed:Resource.tr.resources /culture:tr-TR /out:tr-TR/App_GlobalResources.resources.dll
Best Regards...
|
|
|
|
|
Hello, I searched and didn't find a good answer to these specific questions so I thought I'd post them here:
- What are some suggestions for the best ways people have used for site design for sites containing asp.net and c#?
- I'm getting more into asp.net using VS 2008 but have used Dreamweaver MX for over 5 years. I'd like to continue to use dreamweaver but also use VS for code development. Is that possible?
- Do most developers just stick with VS for full site design and deployment?
Thanks in advance for your responses and patience with my foolish newbie questions.
-----------
Jeff
|
|
|
|
|
I think each one have their own personal criteria ,
For me, if I have to develop something related with asp I will use only VS because it was specially created for that, I think DreamWeaver was made for design tasks and for static web pages.
Each tool has good function as well as weakness, all depends of your experience with each one.
My personal opinion.
|
|
|
|
|
In windows forms development, is it ever practical to use datasets over class objects to store data? What would you prefer and why?
Thanks
Tina
|
|
|
|
|
don't cross post, it is considered rude.
|
|
|
|
|
i have an asp.net application where i was trying to apply .net compression.
here is the code i used in global.asax
private void HttpCompress(HttpApplication app)<br />
{<br />
try<br />
{<br />
string accept = app.Request.Headers["Accept-Encoding"];<br />
if (accept != null && accept.Length > 0)<br />
{<br />
if (CompressScript(Request.ServerVariables["SCRIPT_NAME"]))<br />
{<br />
System.IO.Stream stream = app.Response.Filter;<br />
accept = accept.ToLower();<br />
if (accept.Contains("gzip"))<br />
{<br />
app.Response.Filter = new System.IO.Compression.GZipStream(stream, System.IO.Compression.CompressionMode.Compress);<br />
app.Response.AppendHeader("Content-Encoding", "gzip");<br />
}<br />
else if (accept.Contains("deflate"))<br />
{<br />
app.Response.Filter = new System.IO.Compression.DeflateStream(stream, System.IO.Compression.CompressionMode.Compress);<br />
app.Response.AppendHeader("Content-Encoding", "deflate");<br />
}<br />
}<br />
}<br />
}<br />
catch (Exception ex)<br />
{<br />
}<br />
}<br />
<br />
private bool CompressScript(string scriptName)<br />
{<br />
if (scriptName.ToLower().Contains(".aspx")) return true;<br />
if (scriptName.ToLower().Contains(".axd")) return false;<br />
if (scriptName.ToLower().Contains(".js")) return true;<br />
return true;<br />
}<br />
<br />
protected void Application_BeginRequest(Object sender, EventArgs e)<br />
{<br />
HttpCompress((HttpApplication)sender);<br />
}<br />
i was testing the above implementation using the above code. I found that my .aspx requests were not gzipped. I checked using the tool Fiddler. it was showing normal 'HttpChunkedEncoding'. i don't know why it was not encoding even though i was wrapping the stream with Gzip Filter.
Strangely, with ajax requests, the gzip compression was working fine.
Can anybody please help me find the solution.
Thanks in advance
Tiju John
|
|
|
|
|
Hi,
I'm using .net 2008.i've a datagrid named 'dgUserNote'. I add edit,cancel,upadte and delete like this;
<asp:editcommandcolumn canceltext="Cancel" edittext="Edit" headertext="Edit" updatetext="Update" xmlns:asp="#unknown">
<asp:buttoncolumn commandname="Delete" headertext="Delete" text="Delete" xmlns:asp="#unknown">
and in coding part i written like;
void dgUserNote_EditCommand(object source, DataGridCommandEventArgs e)
{
dgUserNote.EditItemIndex = e.Item.ItemIndex;
}
but when i click edit first time it will not work; second time only it will work
likewise when i'm clicking cancel button first time it will not work,second time it is going to upadtecommand .
cancel i written like this;
void dgUserNote_CancelCommand(object source, DataGridCommandEventArgs e)
{
dgUserNote.EditItemIndex = -1;
}
and Update i written like this;
SqlCommand SqlCom;
try
{
if (ConGlobal.State == ConnectionState.Closed) ConGlobal.Open();
SqlCom = new SqlCommand("SpInsertUserNote", ConGlobal);
SqlCom.Parameters.Add("@IorU", SqlDbType.VarChar).SqlValue = "U";
SqlCom.Parameters.Add("@Title", SqlDbType.VarChar).SqlValue = e.Item.Cells[2].Text;
SqlCom.Parameters.Add("@Description", SqlDbType.VarChar).SqlValue = e.Item.Cells[3].Text;
SqlCom.Parameters.Add("@Date", SqlDbType.VarChar).SqlValue = e.Item.Cells[4].Text;
SqlCom.Parameters.Add("@UserName", SqlDbType.VarChar).SqlValue = mdlNewClass.gStrUserName;
SqlCom.CommandType = CommandType.StoredProcedure;
SqlCom.ExecuteNonQuery();
SqlCom = null;
Response.Write("Record Updated Successfully...");
BindData();
dgUserNote.EditItemIndex = -1;
}
pls help me in this issue
|
|
|
|
|
Maybe i'm missing something but my guess is you should rebind your DataGrid after the event fires.
Example with your Edit Handler
protected void dgUserNote_EditCommand(object source, DataGridCommandEventArgs e)
{
dgUserNote.EditItemIndex = e.Item.ItemIndex;
BindData();
}
If you Re-Bind your DataGrid after all your commands are issued it should work fine for you.
Best of luck,
Cheers
Disgyza
Programmer Analyst
|
|
|
|
|
Thanks for the solution. can u pls help me to find solution regarding with my Datagrid. I'm new to c#. in my coding i'm using control DataGrid named dgUserNote.
in its update command , i'm not getting the values in the cells
when i take e.Item.Cells[2].Text it shows like;
e.Item.Cells[2].Text=""
the code is as follows;
in designing part(asp) i add the Column as follows;
<columns> <asp:editcommandcolumn canceltext="Cancel" edittext="Edit" headertext="Edit" xmlns:asp="#unknown">
UpdateText="Update">
in coding (c#) i wrote like this;
void dgUserNote_UpdateCommand(object source, DataGridCommandEventArgs e)
{
SqlCommand SqlCom;
if (ConGlobal.State == ConnectionState.Closed) ConGlobal.Open();
SqlCom = new SqlCommand("SpInsertUserNote", ConGlobal);
SqlCom.Parameters.Add("@IorU", SqlDbType.VarChar).SqlValue = "U";
SqlCom.Parameters.Add("@Title", SqlDbType.VarChar).SqlValue = e.Item.Cells[2].Text;
SqlCom.Parameters.Add("@Description", SqlDbType.VarChar).SqlValue = e.Item.Cells[3].Text;
SqlCom.Parameters.Add("@Date", SqlDbType.VarChar).SqlValue = e.Item.Cells[4].Text;
SqlCom.Parameters.Add("@UserName", SqlDbType.VarChar).SqlValue = mdlNewClass.gStrUserName;
SqlCom.CommandType = CommandType.StoredProcedure;
SqlCom.ExecuteNonQuery();
SqlCom = null;
Response.Write("Record Updated Successfully...");
BindData();
dgUserNote.EditItemIndex = -1;
dgUserNote.DataBind();
}
pls help me to solve this problem
Thanks&Regards
Princy
|
|
|
|
|
On my Default.aspx page I have an iframe. The iframe has a button and does some calculation. But once the calculation is done I want to pass those values to a panel that is on my Default.aspx.
For instance
Default.aspx
------------------------------------
| |
| iframe |
| |-------------------------- |
| | Button | |
| | | |
| |-------------------------- |
| |
| Panel |
|___________________________________|
Is this even possible please help? Thanks
|
|
|
|
|
|
I am trying to create a server control library that includes an AJAX component from the AJAX toolkit. I have added the controls to the class and I am either
a) getting an exception thrown when I add the extender to the controls collection. This is the
Extender controls may not be registered after PreRender.
Error.
or b) not getting an exception but the control does not render to the page.
This is the code:
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
pExtender.Page = this.Page;
ScriptManager.GetCurrent(this.Page).RegisterExtenderControl<collapsiblepanelextender>(pExtender, pnContent);
EnsureChildControls();
}
protected override void RenderContents(HtmlTextWriter output)
{
try
{
//render panel to page
pExtender.Page = this.Page;
//set extender panel options
pExtender.ExpandedText = ExpandedTitle;
pExtender.CollapsedText = CollapsedTitle;
pExtender.ID = "cpe";
pExtender.TargetControlID = "pnContent";
pExtender.ExpandControlID = "pnTitle";
pExtender.CollapseControlID = "pnTitle";
pExtender.Collapsed = InitialCollapsedState;
pExtender.TextLabelID = "lblTitle";
pExtender.ImageControlID = "imgpanel";
pExtender.SuppressPostBack = false;
//set the id for the two content panels
pnContent.ID = "pnContent";
pnTitle.ID = "pnTitle";
//add the label panel to the control
pnTitle.Controls.Add(TheHeader);
//add the form to the panel
pnContent.Controls.Add(theForm);
//render title panel
//this.Controls.Add(pnTitle);
//render content panel
//this.Controls.Add(pnContent);
//pnSurroundingPanel.RenderControl(output);
this.Controls.Add(pExtender);
//pExtender.RenderControl(output);
//this.Controls.Add(pnSurroundingPanel);
//pnSurroundingPanel.RenderControl(output);
pnTitle.RenderControl(output);
pnContent.RenderControl(output);
}
catch (Exception ex)
{
DiagnosticMessage.reportError(ex);
}
}
If I comment out the line that is causing the exception, this.Controls.Add(pExtender); and replace it with pExtender.RenderControl(output); the exception is not shown but the page is blank and the control has not been rendered to the page.
Does anyone know how to get the ajax control to render properly to the page. I have seen several posts regarding this and have tried a few things but nothing has worked yet.
Any help is much appreciated as tis one has been driving me mental!
Notes:
TheHeader is a usercontrol for the header or closed state of the control and the TheForm is the usercontrol that is the content of the open panel.
Thanks
Simon
|
|
|
|