asp.net-2.0

How to: Cross-Site posting and redirection in ASP.NET webforms

让人想犯罪 __ 提交于 2020-01-02 23:09:00
问题 Scenario: The task I have at hand is to enable a single-signon solution between different organizations/websites. I start as an authenticated user on one organization's website, convert specific information into an Xml document, encrypt the document with triple des, and send that over as a post variable to the second organizations login page. Question: Once I have my xml data packaged, how do I programmatically perform a post to the second website and have the user's browser redirected to the

ASP.NET Forms Authentication - When to use?

我是研究僧i 提交于 2020-01-02 10:03:56
问题 I am not able to decide whether I should go for Forms Authentication ? Forms authentication is often used for personalization, where content is customized for a known user. I do not have such requirement. I have usernames and passwords in the DB and need to authenticate the users against the DB ? What is the best recommended practice to achieve the same in ASP.NET 2.0 ? 回答1: TL;DR: The FormsAuthenication class has nothing to do with passwords. You need to use it to keep users logged in to

classic asp/asp.net website - global.asa not working

为君一笑 提交于 2020-01-02 03:39:17
问题 I've recently been given a website written in classic asp to configure and set up - although it also appears to have pages written in asp.net. The problem I'm having at the moment is that it doesn;t appear to be picking up settings from the global.asa file such as Application("ConnectionString").... As when I try to write them out from somewhere in the code - nothing appears. Any idea how to congure this website to use global.asa...or why it's not already using it? There is web.config file

Calculate StartDate and EndDate for This Quarter and Last Quarter

我的未来我决定 提交于 2020-01-01 07:21:06
问题 I need to calculate a StartDate and EndDate of a current Quarter and the previous Quarter in vb.net. 回答1: Forgive my lack of a VB.net-specific answer, but given a generic sort of date object with various functions in some pseudo-language (with zero-based day and month indexes)... //round the current month number down to a multiple of 3 ThisQuarterStart = DateFromYearMonthDay(Today.Year,Today.Month-(Today.Month%3),0); //round the current month number up to a multiple of 3, then subtract 1 day

Retrieving the COM class factory for component with CLSID Error: 8000401a

半腔热情 提交于 2020-01-01 01:17:35
问题 from last so many times I am getting the below error.As I am using the Microsoft Word dlls to create word files which further attached to the mail. Server Error in '/' Application. Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 8000401a. 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

Is there any native way in ASP.NET to do a “success message”?

僤鯓⒐⒋嵵緔 提交于 2019-12-30 06:17:03
问题 Say you have something like an ASP.NET ASP:DetailsView to show and edit a single record in a database. It's simple to record the error cases... you add validation and a validation summary. When your update form fails validation it naturally makes noise: it shows the validation message and/or the validation summary. Not a single code behind is required. But then, you pass validation, and it makes your update completely silently. There's no sense that anything happened, and there doesn't seem

Is there any native way in ASP.NET to do a “success message”?

烈酒焚心 提交于 2019-12-30 06:16:06
问题 Say you have something like an ASP.NET ASP:DetailsView to show and edit a single record in a database. It's simple to record the error cases... you add validation and a validation summary. When your update form fails validation it naturally makes noise: it shows the validation message and/or the validation summary. Not a single code behind is required. But then, you pass validation, and it makes your update completely silently. There's no sense that anything happened, and there doesn't seem

Allowing partially trusted callers security exception is been thrown althought running on Full trust mode

為{幸葍}努か 提交于 2019-12-25 16:08:43
问题 While developing using ASP.net 2.0 (C#) and NHibernate 2.1.0 I am getting the error: System.TypeInitializationException: The type initializer for 'NHibernate.ByteCode.LinFu.ProxyFactory' threw an exception. ---> System.Security.SecurityException: That assembly does not allow partially trusted callers. This error is been thrown only in the production server (a web hosting company) and in my development environment everything is fine. I also ran this code below on the production server to see

ASP.NET: Ajax UpdatePanel Issue

北城以北 提交于 2019-12-25 02:24:49
问题 I am supposed to update the progress & display the corresponding message on the client side while the function is still under execution at server side. How can I achieve this? The function looks like: protected void Button1_Click(object sender, EventArgs e) { string Result = "Success"; if (Result == "Success") { Label1.Text = "Plan mst Completed"; Thread.Sleep(2000); //Some functionality here Label1.Text = "Packing date mst Started"; } if (Result == "Success") { Label1.Text = "Packing date

Filtering dataset with condition

大憨熊 提交于 2019-12-24 02:45:12
问题 I am using asp.net 2.0 and c#. I have a dataset, which is getting the employee info. Now I want to filter the gridview based on a name that the user has put in the search textbox. I am doing this: DataSet ds = new DataSet("EmployeeInformation"); //........ loading DataSet ds with emploee info string strExpr; strExpr = "Name LIKE %" + txtSearchEmployee.Text.Trim() + "%"; ds.Tables[0].Select(strExpr); I am getting an error in the last step, that the operator is missing. Please guide me how can