Showing posts with label Classic ASP. Show all posts
Showing posts with label Classic ASP. Show all posts

Tuesday, April 22, 2014

How to render an action without layout in ASP.NET MVC?

    public class HomeController : Controller
    {
        public string Create()
        {
     return "Hello";
 }
    } 
There are a couple of other ways:
http://stackoverflow.com/questions/5318385/mvc-3-how-to-render-a-view-without-its-layout-page
Change Layout default setting etc.
But return a string or json result, it is great way in some scenarios.

Monday, December 23, 2013

How to deal with “An error occurred on the server when processing the URL” problem for classic ASP?

This is a generic error for classic ASP hosted on IIS 7.

Go to IIS Server feature: ASP
Enable option: Send Errors to Browser

Then will find underneath real problem

Wednesday, December 5, 2012

Is it possible to run classic asp on Cassini?

No. Need to setup classic ASP application on IIS Server,  then in Visual Studio to attach it and debug

Friday, April 13, 2012

Paging in Classic ASP

ConnectionString ="DSN=DataSourceName"
SQLS = "SELECT * FROM TableName"

Set PRS = Server.CreateObject("ADODB.Recordset")
PRS.CursorLocation = 3 ' adUseClient
PRS.PageSize = 10
PRS.Open SQLS, ConnectionString

CurrentPage = 1
PRS.AbsolutePage = CurrentPage
Do While Not ( PRS.Eof Or PRS.AbsolutePage <> CurrentPage )
    PRS.MoveNext
Loop
PRS.Close
set PRS = nothing

References:
http://support.microsoft.com/kb/202125
http://www.codeproject.com/Articles/619/ADO-Recordset-Paging-in-ASP

Thursday, April 5, 2012

How to sovle "execution of the asp page caused the response buffer to exceed its configured limit." in Classic ASP

Solution#1:
Put this line on the top of page
<%Response.Buffer = False%>


Solution#2:
Limit your record number from database

Thursday, March 29, 2012

How to solve "The specified DSN contains an architecture mismatch between the Driver and Application"?

This error happen on  Classic asp on IIS 7 with window 7 64 bit for MS Access database.

Change the "Advanced Settings" on your Application Pool to "Enable 32-bit applications" = True


Reference:
http://social.technet.microsoft.com/Forums/en/w7itproinstall/thread/02bbfb17-d892-49a3-b1f6-75c2533a18a1

How to set up ODBC system DSN on Windows 7?

in command line run:
C:\Windows\SysWOW64\odbcad32.exe

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

How to run & debug classic ASP in Visual Studio 2010 with IIS 7 on Windows 7

http://www.falconwebtech.com/post/2010/12/28/Debugging-Classic-ASP-in-IIS7-and-VS2010.aspx
Windows Features