EzDevInfo.com

asp-classic interview questions

Top asp-classic frequently asked interview questions

Detailed 500 error message, ASP + IIS 7.5

IIS 7.5 , 2008rc2, classic asp, 500 error msg:

The page cannot be displayed because an internal server error has occurred.

I need to know how to configure IIS to get a more detailed error.
I've tried setting to true all of debugging options in the ASP configuration.
But that didn't work. Can anyone help me?


Source: (StackOverflow)

Response.Redirect HTTP status code

Why is it that ASP/ASP.NET Response.Redirect uses a HTTP-302 status code ("Moved Temporarily") even though in most cases a HTTP-301 status code ("Moved Permanently") would be more appropriate?


Source: (StackOverflow)

Advertisements

Create classic asp project in Visual Studio 2010 from scratch

I have always developed on ASP.NET on 2.0 and higher .NET framework. I am trying to create a website in classic ASP from scratch using VS2010 and can't figure out how to do that.

Thanks


Source: (StackOverflow)

Hex-Value in Visual Basic

Can someone just help me refresh my mind?

How do you specify hex values in a Visual Basic 6 / VBScript Source?

It's not 0xABCD as it is in C++, that's what I can remember... It was something similar... But what?


Source: (StackOverflow)

ASP/VBScript - Int() vs CInt()

What is the difference in ASP/VBScript between Int() and CInt()?


Source: (StackOverflow)

will visual studio 2010 support classic asp?

I'm using visual studio 2008 for a classic asp application. Will I be able to upgrade to visual studio 2010?


Source: (StackOverflow)

Response Buffer Limit Exceeded

I am running a simple query to get data out of my database & display them. I'm getting an error that says Response Buffer Limit Exceeded.

Error is : Response object error 'ASP 0251 : 80004005' Response Buffer Limit Exceeded /abc/test_maintenanceDetail.asp, line 0 Execution of the ASP page caused the Response Buffer to exceed its configured limit.

I have also tried Response.flush in my loop and also use response.buffer = false in my top of the page, but still i am not getting any data My database contains 5600 records for that, pls give me some steps or code to solve this Is there any other solution for that..kindly help me..its urgent

Thanks,


Source: (StackOverflow)

Conversion failed when converting from a character string to uniqueidentifier

Created a stored procedure in SQL 9 (2005) and have since upgraded to SQL 10 (2008). Since then, the following stored procedure has stopped working and thrown up the above error:

ALTER PROCEDURE [dbo].[GetModifiedPages] 
    @vPortalUID			nvarchar(32) = ''
AS
BEGIN
    -- Convert GUID to UI
    DECLARE @nPortalUID AS uniqueidentifier
    SET @nPortalUID = CAST(@vPortalUID AS uniqueidentifier)

The passed in param @vPortalUID contains: 2A66057D-F4E5-4E2B-B2F1-38C51A96D385. I execute the stored proc like this:

EXEC GetModifiedPages '2A66057D-F4E5-4E2B-B2F1-38C51A96D385'

It falls over. I have tried Convert aswell. Still no joy. Have also had the value going in with { } around it. I removed these programatically and manually as above.

If you are interested I am running the SP from an ASP Classic page, although that should not affect this as the above code was run using SSMS.

Thanks in advance for your help. James


Source: (StackOverflow)

Update div with jQuery ajax response html

I am trying to update a div with the content from an ajax html response. I beleive I have the syntax correct, however the div content gets replaced with the entire HTML page response, instead of just the div selected in the html response. What am I doing wrong?

    <script>
        $('#submitform').click(function() {
            $.ajax({
            url: "getinfo.asp",
            data: {
                txtsearch: $('#appendedInputButton').val()
            },
            type: "GET",
            dataType : "html",
            success: function( data ) {
                $('#showresults').replaceWith($('#showresults').html(data));
            },
            error: function( xhr, status ) {
            alert( "Sorry, there was a problem!" );
            },
            complete: function( xhr, status ) {
                //$('#showresults').slideDown('slow')
            }
            });
        });
    </script>

Source: (StackOverflow)

Should new programmers learn ASP first or ASP.Net? [closed]

My colleague here argues that new programmers must learn ASP first, before they learn ASP.Net.

I seem to agree with him as most new programmers who start with ASP.Net do not understand web get, post and state management :(

Which is best to learn web programming Classic ASP or ASP.Net?


Source: (StackOverflow)

Response.Write vs <%= %>

Bearing in mind this is for classic asp

Which is better, all HTML contained within Response.Write Statements or inserting variables into HTML via <%= %>.
Eg

Response.Write "<table>" & vbCrlf
Response.Write "<tr>" &vbCrLf
Response.Write "<td class=""someClass"">" & someVariable & "</td>" & vbCrLf
Response.Write "</tr>" & vbCrLf
Response.Write "</table>" & vbCrLf

VS

<table>
  <tr>
     <td class="someClass"><%= someVariable %></td>
  </tr>
</table>

I am mainly asking from a performance point of view in which will have the least server impact when there multiple variables to insert?

If there are no technical differences what are the arguments for one over the other?


Source: (StackOverflow)

Setting HTTPONLY for Classic Asp Session Cookie

Does anyone know exactly how to set HTTPONLY on classic ASP session cookies?

This is the final thing that's been flagged in a vulnerability scan and needs fixing ASAP, so any help is appreciated.

~~~A LITTLE MORE INFORMATION ON MY PROBLEM~~~

Can anyone please help me with this?

I need to know how to set HTTPONLY on the ASPSESSION cookie created by default from ASP & IIS.

This is the cookie automatically created by the server for all asp pages.

If needed i can set HTTPONLY on all cookie across the site.

Any help on how to do this would be massively appreciated.

Thanks

Thanks Elliott


Source: (StackOverflow)

How to unregister the assembly registered using regasm

I registred one of my dll in the development machine using regasm as below[asp aplication]

In cmd prompt ,i navigated to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

Regasm /tlb "xxx.dll"

now i made some changes in dll .. so i unregistered the dll using below cmd

regasm /u xxx.dll /tlb:xxx.tlb

The again registered the updated dll with same command.But the changes are not coming up in the project ,so i doubt its still pointing to the old dll.I restarted teh machine ,iis no use . So

**1.what are the ways to make sure my old dll is removed and the current one is new.

2.is there any physical path to check them manually**

UPDATE The below solution fixed the issue

To Register

SET WorkFolder= ''

regasm.exe %WorkFolder%\xxx.dll /Codebase

To Unregister

SET WorkFolder= ''

regasm.exe /unregister %WorkFolder%\xxx.dll


Source: (StackOverflow)

How do I enable upload of large files in classic ASP on IIS 7?

Recently I had to get an old ASP application working in IIS 7.5 on a W2K8 server. Almost everything works fine, except that I can't seem to get it to accept uploads larger than ~200kB. I did find a setting, that from what I can understand should to the trick, in the applicationHost.config, I set the max request size to 100 MB like this:

<location path="TheNameOfMySite">
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="104857600" />
            </requestFiltering>
        </security>
    </system.webServer>
</location>

Unfortunately, this seems to do nothing at all, it still refuses to accept any files larger than about 200 KB, and in the log file it gives this error message:

ASP_0104_:_80004005|Operation_not_Allowed

Googling that points to increasing the maxAllowedContentLength as I have done above. So I'm fresh out of ideas, but confident that the clever stackoverflow crowd can solve this in less time than it took for me to write this question.


Source: (StackOverflow)

ASP.NET MVC reminds me of old Classic ASP spaghetti code

I just went through some MVC tutorials after checking this site out for a while. Is it just me, or does MVC View pages bring back HORRIBLE flashbacks of Classic ASP spaghetti code with all the jumping in and out of HTML and ASP.NET with yellow delimiters everywhere making it impossible to read? What ever happened to the importance of code/design separation?? I was really sold on the new technology until the tutorials hit the View page development section.

Or am I missing something? (And don't say you can use the template to help because it's jsut moving the spaghetti to another location - sweeps it under the rug - it doesn't fix the problem)


Source: (StackOverflow)