all groups > iis security > december 2005 >
You're in the

iis security

group:

Application gets a 401 error when launched by asp page.


Application gets a 401 error when launched by asp page. Cronos - Bob Marton
12/21/2005 1:25:01 PM
iis security:
I have moved a website from IIS 5 to IIS 6.

I have an asp page which refers to a dll file which executes an application
which creates a thumbnail of an image which is uploaded to the SQL database
and accessed by the asp pages.

The asp now gives me a 401 error message on the file being accessed.

I will include the error messages and the code which creates the thumbnail
image below.

I have opened up the permission so much that my server is now in danger from
everyone in the world exept it still can't perform the actions called on by
the DLL/

10.227.100.13 - cronos-comp\cgf [21/Dec/2005:12:32:00 -0800] "POST
/admin/edit_Canvas.asp HTTP/1.1" 200 6824
10.227.100.13 - cronos-comp\cgf [21/Dec/2005:12:32:02 -0800] "GET
/admin/Canvas.asp HTTP/1.1" 200 2762
10.227.100.13 - cronos-comp\cgf [21/Dec/2005:12:32:06 -0800] "GET
/admin/edit_canvas.asp?id=24 HTTP/1.1" 200 6776
10.227.100.13 - cronos-comp\cgf [21/Dec/2005:12:32:09 -0800] "GET
/admin/upload_image.asp?ImageType=14&ID=24 HTTP/1.1" 200 1275
10.227.100.13 - cronos-comp\cgf [21/Dec/2005:12:32:09 -0800] "GET
/admin/admin.css HTTP/1.1" 304 248
10.227.100.13 - - [21/Dec/2005:12:32:20 -0800] "POST
/admin/upload_image_response.asp?id=24&imagetype=14 HTTP/1.1" 401 2119

The problem is indicated by the last line above. The client must log in to
the admin pages with a user name and password which is setup to be Microsoft
Integrated.

Below is a listing of the asp code.

Set cgf = server.CreateObject("CGF.Thumbnail")



Declares an object that is contained within the dll. The line:



Result = cgf.CreateThumbnail(Location & Filename, Location & "thumbnails\" &
Filename)



Is what creates the thumbnail.

' Create thumbnail.

if FileSaved = true and (Request.QueryString("ImageType") < 11 or
Request.QueryString("ImageType") >= 14) then

Set cgf = server.CreateObject("CGF.Thumbnail")

if Request.QueryString("ImageType") = 2 then

Result = cgf.ChopMoulding(Location & Filename, "700")

if Result = "OK" then

conn.Execute "UPDATE Moulding SET
ImageWidth=" & cgf.LastWidth & ", ImageHeight=" & cgf.LastHeight & " WHERE
MouldingID=" & Request.QueryString("id") & ";"

end if

end if

Result = cgf.ThumbnailSettings(clng(MaxWidth), clng(MaxHeight),
clng(Quality))

Result = cgf.CreateThumbnail(Location & Filename, Location &
"thumbnails\" & Filename)



set cgf = nothing

end if

Re: Application gets a 401 error when launched by asp page. Bernard Cheah [MVP]
12/22/2005 4:15:15 PM
Is this IIS 6 log file ? can you enabled the logging for sub-status code
field?
we need to know the .X in the 401.x

--
Regards,
Bernard Cheah
http://www.iis-resources.com/
http://www.iiswebcastseries.com/
http://www.msmvps.com/blogs/bernard/


[quoted text, click to view]

AddThis Social Bookmark Button