asp.net

app_offline asp.net 2005

Why app_offline.htm is created automatically? and my project do not work ? ...

Is a (unicode) String encoding neutral?

In .NET, a string is a unicode character string. My understanding is the string itself does not contain any particular encoding information, ie is encoding neutral? You can use any encoding method to decode a string into a stream of bytes and then encode a stream of bytes into a recognizable string, as long as the encoding method matches...

Cannot implicitly convert type 'System.Data.Linq.ISingleResult<CustomeProcedureName> to 'int'

Sorry for this simple question . I have a Stored Procedure that return an int value , I'm trying to call this sp from my asp.net linq to sql project . int currentRating = db.sproc_GetAverageByPageId(pageId); But i get this error : Cannot implicitly convert type `'System.Data.Linq.ISingleResult<PsychoDataLayer.sproc_GetAverageByPag...

which is faster views or stored procedure? asp.net sql server

Hi Everybody, i want to know whether views or stored procedures are faster. i am developing application in asp.net with sql server. Which one should i use for good performance of asp.net application. Thanks ...

calling a function every five minutes asp.net

Hi everybody, Suppose i want to display Hello World Message. How to call this function every five minutes? ...

Is there any way to skin an event handler?

I have a shared code i want to run on the data binding of EVERY gridview in website. conveniently enough i placed the code itself in a base class in App_Code that all my pages inherits from, and i link to that function in every page i place a grid view in the databind event. I am looking to make it one step further and place that linkag...

Social networking sites using ASP.NET or PHP

I am familiar with both ASP.NET and PHP and now want to develop a social networking website. Before start development, I have been browsing some articles / forums and etc to find out which technology is suitable to develop and handle much traffic in future. Some people prefer PHP for the development. Is this only because of: open sou...

Why isn't .ASPAUX cookie being validated by FormsAuthentication?

I have a site that uses FormsAuthentication and yes, the name of the cookie is .ASPAUX :) I can log in perfectly. The server creates a forms authentication ticket, packs it in a cookie, properly determines the expiration time (1 year ahead) and sends it to the client. For some reason, after some time, even though the cookie is there ye...

Caching problem in asp.net

I am having problem in clearing the cache in asp.net. Below is my code in page load. My response string is and xml string. If i refresh my page then the xml output is not getting refreshed. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try HttpResponse.RemoveOutputCacheItem("/spin.a...

while trying to download a file : the process cannot access the file because it is being used by another process

Hi all, I am trying to download a file from the server but i am getting this error: The process cannot access xxxx the file because it is being used by another process This is my CODE: string fileName="DownLoadFiles"; string filePath = hid_filepath.Value; FileInfo file = new FileInfo(filePath); System.Net.WebC...

asp.net redirecting to login page

If I have set the forms authentication timeout to 30 days (in minutes) and I have set the session timeout to 5 mins and I am using a cookie to persist the different session variables .. why does asp.net or IIS always always issue a 302 and redirects to the login page when the session times out ? (Doing http debugging it puts an "object ...

Where to find great resources on ASP.net Architecture, Web Site Architecture?

I've recently become heavily involved in a few projects that are going to work as company-wide intranet systems. They will basically be intranet websites, replacing older legacy systems that are desktop-based. I'd like to research the best ways to set-up these web site, or web application projects. Most notably, I'm looking for: Diff...

Accessing shared memory while impersonating a client

I'm trying to access global shared memory from an ASP.NET web method while impersonating a client, but I get access denied when trying to open the handle. As an example: [WebMethod] public string Testing() { string result = null; using (var ctx = WindowsIdentity.Impersonate(IntPtr.Zero)) { IntPtr p1 = NativeMethods.OpenFileMa...

What is the server configuration to handle much traffic?

In order to handle much traffic, assume that there are 1 billion page views per day, what would be the best configuration of web server? Actually this will depend on so many factors like 1. how well the application architectures is? 2. how optimized the database server is and etc? But in idle scenario, what would be the best server co...

DotNetOpenAuth and FormsAuthentication

Hi, I'm implementing DotNetOpenAuth (OpenID) and Forms Authentication as the authentication mechanism for a site I'm building. However, I'm not happy with parts of the solution I've come up with and though I should check with you guys how it is usually done. I have set the Forms Authentication loginUrl to login.aspx. This is the code b...

Ajax calendar control

I had Ajax calendar. So I want to prevent user to add date in textbox which I added to him calendar to select from it. Also when he choose invalid date the Ajax calendar return him to the date of today and this not logic so I want to prevent that. ...

DDl compare validator

I had ddl and I added compare validator to make user choose from DDl.And I set all it,s properties well but when i forget to select ddl the validator apear well but when I selected from ddl The astrics(*) as error text it was still apear although I added it,s property focus on error=true.So please any one help me. ...

how add title and meta tags for content pages in a project base on master and content page(dynamically)

how can i add title and meta tags for content pages in a project base on master and content page(dinamically) ? i used the blow method for master page : public void SetMetaTags(string title, string description, string keywords) { // Get a reference to the HTML Head HtmlHead headTag = (HtmlHead)Page.Header; // Set the page...

How do I get Route name from RouteData?

I have several routes defined in my Global.asax; now, when I'm on a page I need to figure out what is the route name of the current route, because route name drives my site menu. I can't find a way to get current route name. Any help would be highly appreciated! Andrey ...

IIS 500.19 error on ASP.NET 4.0 sub-application

I've created a "test" application below the main application on my website which is an exact duplicate of the main application - I use the /test app to test new changes before putting them in production. After upgrading the app from .NET 3.5 to .NET 4.0, my /test application refuses to run, returning a 500.19 error from IIS. My main app...