|
You are welcome, hope its some help
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Anyone ahve any suggestions on what can be wrong when getting this error. I've installed my ASP.NET app on two machines .NET 2.0 and on one of the cpus this error occures.
Server Error in '/Distributor' Application.<br />
--------------------------------------------------------------------------------<br />
<br />
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)<br />
at FleetManagement.Services.SystemAdministrationServices.UserManager.GetUserRoles(String userName, String password)<br />
at FleetManagement.Services.SystemAdministrationServices.SystemAdministrationServices.GetUserRoles(String userName, String password)<br />
at FleetManagement.Services.AuthenticationServices.Authenticate.GetUserRoles(String userName, String password)<br />
--- End of inner exception stack trace --- <br />
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. <br />
<br />
Exception Details: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)<br />
at Scania.FleetManagement.Services.SystemAdministrationServices.UserManager.GetUserRoles(String userName, String password)<br />
at Scania.FleetManagement.Services.SystemAdministrationServices.SystemAdministrationServices.GetUserRoles(String userName, String password)<br />
at Scania.FleetManagement.Services.AuthenticationServices.Authenticate.GetUserRoles(String userName, String password)<br />
--- End of inner exception stack trace ---<br />
<br />
Source Error: <br />
<br />
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. <br />
<br />
Stack Trace: <br />
<br />
<br />
[SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)<br />
at Scania.FleetManagement.Services.SystemAdministrationServices.UserManager.GetUserRoles(String userName, String password)<br />
at Scania.FleetManagement.Services.SystemAdministrationServices.SystemAdministrationServices.GetUserRoles(String userName, String password)<br />
at Scania.FleetManagement.Services.AuthenticationServices.Authenticate.GetUserRoles(String userName, String password)<br />
--- End of inner exception stack trace ---]<br />
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431766<br />
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204<br />
Scania.Components.Authentication.AuthenticationServices.Authenticate.GetUserRoles(String userName, String password) +123<br />
Scania.Components.Authentication.AuthenticationHandler.GetRolesAsDelimitedString(String userName, String password, String delimiter) +101<br />
Scania.Components.Authentication.TicketManager.Get(String userName, String password) +106<br />
ScaniaDistributor.WebForm1.btnLogin_Click(Object sender, EventArgs e) +270<br />
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111<br />
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110<br />
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10<br />
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13<br />
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36<br />
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565<br />
<br />
<br />
<br />
<br />
--------------------------------------------------------------------------------<br />
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
_____________________________
...and justice for all
|
|
|
|
|
|
Hi to All,
I am planning to create a new web site in my free times. So that I can learn, in a productive way.
Now, since I am a beginner in ASP.NET (I have worked on VB.NET earlier)....I need certain help in starting up the project.
What I mean is, like certain points or tips or tricks or measures , we need to take care in initial point of doing any project....Please advice me those,if any, in ASP.NET projects...or point me out those places where I need to take care of it initially, so that later on I needn't to Re-Do everything, for any kind of change.
Example: say for scalability of the project, I need to beak my project in modules, so that any change can be updated easily....something like that...
Thanks in advance.
-----------------------------
I am a beginner
|
|
|
|
|
You'd do well to work out what parts of your page will appear on all pages, and put them in a master page. Then as you create parts of pages, you'd do well to consider controls that might appear on more than one page, and create them as user controls. You'd also do well to create your own base page class, which will give you access to things you commonly use. The first thing I add to such a base class, is access to a strongly typed version of the master page.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thanks a lot,
I am going to use vb.net code ....Please tell me any demerits of using vb.net code instead of C#?
thanks again
-----------------------------
I am a beginner
|
|
|
|
|
hrishiS wrote: Please tell me any demerits of using vb.net code instead of C#?
I don't think there are any. Just use whichever language you feel comfortable with, as both are fully supported in ASP.NET.
[edit]fix spelling[/edit]
modified on Tuesday, October 20, 2009 11:51 AM
|
|
|
|
|
As someone else said, VB.NET and C# both compile to the same intermediate language. There's no reason to choose one over the other, except personal preference. In ASP.NET you can actually write some pages in one and some in the other, if you wanted to, but I don't recommend it. Just use what you are comfortable with.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
That's an excellent tip, Christian. I'll use it myself. But could you clarify what you mean by "access to a strongly typed version of the master page?" Specifically, what makes a Master Page "strongly typed?"
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Using style sheets(css) makes it easier to Modify/change styles of your web pages.
|
|
|
|
|
Hi All,
I have html file, I want to find out all images and their ids from html file and store all images id in array.
Please need your help...
Thanks
Rajesh
|
|
|
|
|
You could use regular expressions to do this.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks for reply but if you have example code, so please provide me.
|
|
|
|
|
Use the WebBrowser control that comes with .NET. You can use the WebBrowser.Document.Images collection to get the list of image tags in the html page.
WebBrowse1.Navigate("c:\mypage.html");
List<string> images = new List<string>();
HtmlElementCollection elements = WebBrowser1.Document.Images;
foreach(HtmlElement e in elements) {
images.Add(e.Attributes("id");
}
|
|
|
|
|
I tried paging in ASPNET. My code get the lists from the database using stored procedure with entire records. Then, according to the number of pages, the page number should be displayed. I need only limited number of page numbers to be shown in a page.
When, I click next button, next set of page number should be displayed. My stored procedure will return dataset.
This is my code for Paging..
private void doPaging()
{
DataTable dt = new DataTable();
dt.Columns.Add("PageIndex");
dt.Columns.Add("PageText");
for (int i = 0; i <= totalpage; i++)
{
DataRow dr = dt.NewRow();
dr[0] = i;
dr[1] = i + 1;
dt.Rows.Add(dr);
}
dlPaging.DataSource = dt;
dlPaging.DataBind();
}
This code will display all page numbers once in a page.. Instead I need only 5 page numbers should display once. When I click next button, next 5 page numbers should be displayed
|
|
|
|
|
This is messy. Why do you need a datasource made up of a data table to do this ? A List of numbers is a viable data source. Of course, you're stepping from 0 to the number of pages, you need to change the code to only loop through the numbers you want to show. That seems obvious to me.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Wat abt remaining numbers? How should I use that?
|
|
|
|
|
I don't understand. You said you wanted to only show 5 numbers, so I said then write code to only show those.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
<1 2 3 4 5>
When Clicking the next button, next page number should be displayed. Anyhow, I solved the problem. Thank u
|
|
|
|
|
I m creating a menu in user controller.
When i added user controller in web page.
In mozilla Firefox it is working properly. Like this Image[^]
In Internet Explorer The sub menu goes under the web page. (Position:absolute) Like This[^]
otherwise in Internet Explorer The sub menu show with some white space. (Position:inherit) Like this[^]
Please Help me.
|
|
|
|
|
This is an IE bug. You should look at menu controls that already exist, and how they do it. There's one built in to ASP.NET.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks Christian Graus.
Now I Tried that control in ASP.NET Webpage. It is working properly in IE. and I used Same code block.
But I copied same code and component, & I tried in User-controller but same problem is coming.
How can I come out from this Problem
or Is any alternative way is there???
|
|
|
|
|
OK, the issue is probably to do with what's in your user control. At the end of the day, it's a bug in IE, I've come across it, but I just found another control that didn't do it, I don't know what the actual workaround is.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Actually I m creating a menu. That Menu common for all other web page.
As shown in Picture I want show all product in menu (3 sub menu is there) so is any other component in ASP.NET???
|
|
|
|
|
Hi all,
I'm developing an ASP.Net app with C#. I have a Gridview that I want to show right on page load. I'm then capturing data into the textboxes and need to save it on the gridview right after clicking ADD button.
I can't get my Gridview displayed on page load and when saving the data from the textboxes to the Gridview I get this error:
"Column ‘Full Names’ does not belong to table"
This is what I've got in my code
html Design:
<asp:gridview id="dgInfoProfile1" runat="server" autogeneratecolumns="False">
<columns>
<asp:templatefield headertext="Full Names">
<asp:templatefield headertext="Identifying Number">
<asp:templatefield headertext="Passport Number">
Page_Load:
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.Add(new DataColumn("Full Names"));
dt.Columns.Add(new DataColumn("Identifying Number"));
dt.Columns.Add(new DataColumn("Passport Number"));
this.dgInfoProfile.DataSource = dt;
dgInfoProfile.DataBind();
}
ADD button:
protected void brtAdd_Click(object sender, EventArgs e)
{
try
{
DataRow dr = dt.NewRow();
dr["Full Names"] = txtFirstName3.Text;
dr["Identifying Number"] = txtIdentityNo.Text;
dr["Passport Number"] = txtPassportNo.Text;
dt.Rows.Add(dr);
//Bind GridView Here with this Table
this.dgInfoProfile.DataSource = dt;
dgInfoProfile.DataBind();
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
I'm not sure where I've missed it, your advice and help in this is highly appreciated.
Thanks.
|
|
|
|