Skip to main content

Posts

Showing posts with the label ASP

Determining how to properly call a stored procedure

Set Conn = Server.CreateObject("ADODB.Connection") ' The following line must be changed to reflect your data source info Conn.Open "data source name", "user id", "password" set cmd = Server.CreateObject("ADODB.Command") set cmd.ActiveConnection = Conn ' Specify the name of the stored procedure you wish to call cmd.CommandText = "sp_MyStoredProc" cmd.CommandType = adCmdStoredProc ' Query the server for what the parameters are cmd.Parameters.Refresh %> <Table Border=1> <TR> <TD><B>PARAMETER NAME</B></TD> <TD><B>DATA-TYPE</B></TD> <TD><B>DIRECTION</B></TD> <TD><B>DATA-SIZE</B></TD> </TR> <% For Each param In cmd.Parameters %> <TR> <TD><%= param.name %></TD> <TD><%= param.type %></TD> <TD><%= param.direction %></TD> ...

URL Rewriting in ASP.NET

With classic ASP, the only way to utilize URL rewriting was to write an ISAPI filter or to buy a third-party product that offered URL rewriting capabilities. With Microsoft® ASP.NET, however, you can easily create your own URL rewriting software in a number of ways. What Happens When a Request Reaches IIS if a request comes in for a Web page named Info.asp, IIS will route the message to the asp.dll ISAPI extension. This ISAPI extension will then load the requested ASP page, execute it, and return its rendered HTML to IIS, which will then send it back to the requesting client. For ASP.NET pages, IIS routes the message to the aspnet_isapi.dll ISAPI extension. The aspnet_isapi.dll ISAPI extension then hands off processing to the managed ASP.NET worker process, which processes the request, returning the ASP.NET Web page's rendered HTML. “You can customize IIS to specify what extensions are mapped to what ISAPI extensions. the ASP.NET-related extensions—.aspx, .ascx, .config, .asmx, ....

Response buffer limit exceeded

Error message when a Web browser sends a request for an active server page to a Web server that is running IIS 6.0: "Response buffer limit exceeded" Response object error 'ASP 0251 : 80004005' Response Buffer Limit Exceeded /PageName.asp, line LineNumber CAUSE This issue occurs because of a change in behavior that was introduced in IIS 6.0 and added to IIS 5.0. These versions of IIS enforce a default ASP response buffer limit of 4 MB. This limit prevents large ASP responses from adversely affecting the IIS process that hosts the Web application. If an ASP request generates a response that is larger than the configured buffer limit, you experience the symptoms that are mentioned in the "Symptoms" section. Method 4: Increase the buffer limit You can increase the buffering limit if one of the following conditions is true: • The client is not a Web browser. • You cannot redesign the application to take advantage of a paging technology, such as the GridView class...

Javascript with ajax, non-ajax

non - ajax: http_request.open('GET', url, false); http_request.send(null); return processSites(http_request.responseText); function showSites() { if (http_request) { num = getSites(iCounter+1,100,1) iCounter +=num; if (num==100) tmout = setTimeout(showSites,1000); else { document.getElementById("debugload").innerHTML = objectIx; iCounter = 0 } } } ajax: http_request.open('GET', url, true); http_request.send(null);

ASP Error ‘ASP 0104: 80004005'

Solution: Open IIS Manager Right click on your local computer In the Internet Information Service windows the very first checkbox is “Enable Direct Metabase Edit”. Open your metabase.XML which is located in c:\Windows\System32\Inetsrv find the line “AspMaxRequestEntityAllowed” and change it to “1073741824″. (1GB) (may need stop IIS first before modify) or will be much better to modify with this: Internet Information Services (IIS) 6.0 Resource Kit Tools: http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&DisplayLang=en

Image downloading from remote servers in ASP

In this tutorial, we will access to a remote server, download image, rename ths image and save to our file system. We will use one function ( getImage ) and one subroutine ( saveImage ) to complete this sampel code. First part of our code, get image byte array from remote server. Second part contains a subroutine that writes byte array to file system. Lets's put our function and subroutine calls in the beginning of code. Creating variables imageUrl = "htp://www.some-domain-name.com/images/target-image.jpg" strImageName = "new-image.jpg" Function and subroutine calls saveImage getImage(imageUrl), strImageName Here is code library: Function getImage(strImageUrl) ' Set objHttp = CreateObject("Microsoft.XMLHTTP") ' Set objHttp = CreateObject("MSXML2.ServerXMLHTTP") Set objHttp = CreateObject("WinHttp.WinHttpRequest.5.1") ' Set Http = CreateObject("WinHttp.WinHttpRequest") objHttp.Open "GET", URL, False ob...