asp.net

Where can I find a good NHibernate and ASP.NET MVC Reference Application

Where can I find a good NHibernate and ASP.NET MVC Reference Application? I downloaded S#arp and this seemed to be a lot more than I needed (IOC and CodeGen via T4). I might work my way up to this later, but I need something smaller at first. Any simple examples? I just want to pick up how NHibernate Session handling works in ASP.NET MV...

Does any one know where the RenderAction HtmlHelper is in ASP.NET MVC in RC1

Does anyone have an alternative to the RenderAction HtmlHelper seeing as it's gone in RC1. I need to render a user control but use a different controller to populate the user control view. How might this work now? ...

How to add users for windows authentication / IIS

I'm porting a legacy (read ancient) .asp application to a new server for backup purposes. It uses this code to determine the user: sLogonUser = LCase(Request.ServerVariables("LOGON_USER")) I believe in order for this field to be populated, I've got to turn on "Windows Integratged Authentication" using IIS Manager. I've done this, but n...

how secure is the Ticket.UserData in User.Identity in asp.net

My website uses ASP.NET's forms authentication and i am inserting user specific information into the UserData portion of the authentication ticket/cookie. Since the UserData is inside the authentication ticket it is encrypted like so authCookie.Value = FormsAuthentication.Encrypt(newTicket); Now I am not too worried about the data bei...

ASP.net page without a code behind

I have an ASP.Net page with a C# code behind. However, I've been asked to not use a code behind - so that it will be easier to deploy in SharePoint. Is there a way to include the C# code in the ASP.Net page, without using a separate code behind file? ...

AutoEventWireup and base.OnLoad(e) Calling Self resulting in Stack Overflow

Using VS2008, C#. When AutoEventWireup is set to true and in a webform I call base.OnLoad(e) like protected void Page_Load(object sender, EventArgs e) { base.OnLoad(e); } The base.OnLoad(e) ends up calling Page_Load (calls itself). This ends up with a stack overflow error. I've been able to solve it by setting AutoEventWireup to...

Storing word documents

Hi, I'm working on job site (using asp.net 3.5) in which a user can upload one or more resumes. Database is sql server 2005. Whats the recommendation regarding storage of these documents? Shall i store it as a blob in the database or just store the path in database and keep the document in the physical folder? Can someone please mention...

ASP.NET Login Control is redirecting to default.aspx even when the destinationpageurl is not set.

Hi We have a login control on a page named login.aspx which is set as the start page of the website. Once the user logs in, it is redirecting to default.aspx although our destinationpageurl is not set to any value. If we set the destinationpageurl to somepage.aspx, it is working redirecting properly, but why is it redirecting to defaul...

ASP.NET MVC Complex Views

I have a question about complex views in ASP.NET MVC. Where can I find good examples or best practice information on complex views and how best to create them in ASP.NET MVC. I know the basics, but peppering the HTML with complex dynamic HTML and/or jQuery seems to be messy. Any links to enterprise best practices or examples from expe...

How to make an ASP.Net page with a C# code behind that will work in Sharepoint

I need to develop a page for Sharepoint. Basically it is a 3 step process that takes some inputs, gets some data and shows a preview of it, then allows the data to be sent off attached to an email. I know ASP.Net and C#.Net, and the problem should be reasonably easy to solve with an ASP.Net page and a C# code behind. However I've neve...

Best way to search data in xml files?

In our new project we have to provide a search functionality to retrieve data from hundreds of xml files. I have a brief of our current plan below, I would like to know your suggestions/improvements on this. These xml files contain personal information, and the search is based on 10 elements in it for example last name, first name, emai...

Time bomb needed in ASP.NET application

We've developed a bespoke ASP.NET application for use on our customer's intranet. It appears they're unlikely to pay for it, so our boss would like us to introduce a time bomb. [Edit:] Technical responses only please! Whether this is a good (or legal) idea is a question for CEOoverflow.com ;-) All pages in the application inherit from...

If you had to pick a free CMS to integrate with ASP.NET MVC what would you pick?

I am looking for starting from scratch with a CMS - specifically one that will integrate well with ASP.NET MVC. preferably somebody has written Html Helpers for me must be easily editable by an idiot must give me really nice clean HTML must be able to store simple strings, or full blown documents would really prefer SQL server as the ...

Read Post Data submitted to ASP.Net Form

I have a working login form in an asp.net application. Standard stuff with a username and password text box and a button to process the login. Works fine. I have a new requirement to allow the user to input the username and password from a separate plain html page that is not a part of my asp.net application. I plan on achieving this...

What is the best practice for using ASP.NET MVC to render lots of html or text files?

I have a lot of html pages, but I don't know how to display them through the asp.net mvc view. I buid a view as my template and use asp.net mvc to insert html into the template and then render it. But the question is that I must use FileStream to read the raw html-based files into memroy and then put it into view template, like ViewDa...

expiration date in newly created authentication ticket (asp.net forms auth)

i am using asp.net forms authentication and the asp.net Login control. the login control has a "RememberMe" checkbox. after the user is authenticated it raises the LoggedIn(object sender, EventArgs e) method and inside this method i am viewing the authentication cookie created by using this HttpCookie authCookie = FormsAuthentication....

Using the ASP.NET AJAX UpdatePanel with output caching

Is there a way to have the UpdatePanel control play nicely with output caching? I'd like to cache an entire ASP.NET page using the @OutputCache directive, EXCEPT for the UpdatePanel area. ...

Excel dll for Microsoft.Office.Interop.Excel

We want to use Microsoft.Office.Interop.Excel in our web application. Everything works fine on our local machines, but on our test machine we're running into problems. It has neither Visual Studio nor Office installed on it. We're using .NET framework 2.0 and the server is running on Windows Server 2003 with IIS6. Is there a dll that ...

How can I stop asp.net encoding & in Get params?

I am using the following code to add a series of calls to the body parameter of a page in asp.net: uxBodyTag.Attributes["onbeforeunload"] += "ajaxRequest('UnlockQuery.ashx?QueryID=" + queryId.ToString() + "&UserID=" + Session["UserID"].ToString() + "');"; This is being rendered as: <body id="uxBodyTag" onbeforeunload= "ajax...

ASP.NET 2.0 Membership: ValidateUser not locking out the user?

Hi I am using the default SQLMembershipProvider in my ASP.NET 2.0 website, and expect the Membership.ValidateUser to lock-out the user after entering a number of wrong passwords (5, in my case) but ValidateUser doesn't seem to be caring about keeping count of bad password attempts and locking out the user. What's wrong? The Membership...