Foros del Web » Programando para Internet » ASP Clásico »

error

Estas en el tema de error en el foro de ASP Clásico en Foros del Web. Tengo dos paginas asp para crear una galeria de fotos una q la crea (La q me da este error) y la otra q no ...
  #1 (permalink)  
Antiguo 21/05/2003, 04:52
 
Fecha de Ingreso: diciembre-2001
Mensajes: 248
Antigüedad: 22 años, 5 meses
Puntos: 0
error

Tengo dos paginas asp para crear una galeria de fotos
una q la crea (La q me da este error) y la otra q no da nada.1


Objeto Server error 'ASP 0177 : 800401f3'

Error en Server.CreateObject

ProgID no válido.



Esto que significa o como lo arreglo???

Gracias
  #2 (permalink)  
Antiguo 21/05/2003, 08:09
Avatar de u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 22 años, 5 meses
Puntos: 98
mmmhhh, estás tratando de instanciar un COM que no tienes registrado en tu servidor, por qué no nos pones un poco mas de código para ver cual es.


Salu2,
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway
  #3 (permalink)  
Antiguo 21/05/2003, 20:26
Avatar de maestro  
Fecha de Ingreso: febrero-2002
Ubicación: España
Mensajes: 2.364
Antigüedad: 22 años, 4 meses
Puntos: 1
Deduzco que o es FSO o es ASPJPEG para las imagenes.
Danos mas datos, pon las lineas del script del error (no todas eh!)
__________________
Jose Maria Fernandez
[email protected]
Http://www.expansionweb.net
  #4 (permalink)  
Antiguo 24/05/2003, 02:53
 
Fecha de Ingreso: diciembre-2001
Mensajes: 248
Antigüedad: 22 años, 5 meses
Puntos: 0
Pos aqui ta toooo

<%@ Language=VBScript %>
<%
'Some Golbal Page Stuff
Response.Expires = -1
Server.ScriptTimeout = 400
Dim numPics, MaxThumbHeight, MaxThumbWidth, tableWidth, strWhereAmI, strURLPath, fs
'How many pictures per row???
numPics = 4
'How wide in Pixels do you want each cell in the table?
tableWidth = 120
'What is the Max Height you want for your thumbnails
MaxThumbHeight = 85
'What is the Max Width you want for your thumbnails
MaxThumbWidth = 75
'What is the Title of the Gallery?
galleryTitle = "Picture Gallery"
'Page needed look-ups
tableWidth = tableWidth * numPics
strWhereAmI = Server.MapPath(".")
strURLPath = Left( Request.ServerVariables("PATH_INFO"), _
InstrRev( Request.ServerVariables("PATH_INFO") , "/" ) )

Set fs = CreateObject("Scripting.FileSystemObject")
%>
<html>
<head>
<script language="javascript" type="text/javascript">
<!--
var win = null;
function NewWindow(mypage,myname,w,h,scroll)
{
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left ='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}
// -->
<!-- Begin
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
// End -->
</script>
</head>
<body>
<h2><%= galleryTitle %></h2>
<br>
<% ShowFiles( strWhereAmI ) %>
<br>
</body>
</html>
<%
Sub ShowFiles(folderspec)
Dim f, strFile, fc, s, sFileName
Set f = fs.GetFolder(folderspec)
Set fc = f.Files

Response.Write "<table with=""" & tableWidth & """ cellpadding=""4"" align=""center"" border=""0"">" & vbCrlf
cellCount = 0
For Each strFile in fc
sFileName = strFile.name
if Instr( Left( sFileName,2 ), "_" ) = 0 then
'Note! ASP-Image only works with jpg images
if Lcase( Right( sFileName, 4 ) ) = ".jpg" then
cellCount = cellCount + 1
if cellCount = 1 then Response.Write "<tr valign=""middle"">" & vbCrlf

Response.Write "<td width=""120"" align=""center"">"
Response.Write GeneratePicPopUp( strURLPath, sFileName ) & "</td>" & vbCrlf

if cellCount = numPics then
Response.Write "</tr>" & vbCrlf
cellCount = 0
end if
end if
end if
Next
if cellCount <> 0 then
For i = 1 to ( numPics - cellCount )
Response.Write "<td width=""120"">&nbsp;</td>" & vbCrlf
Next
end if
Response.Write "</table>" & vbCrlf
End Sub

'Picture Pop Up Picture Generation happens here
'This Function first sees if there is a thumbnail, if there isnt
'It'll send away to "Sub GenerateThumbnail" to do so
'After that, it builds the hyperlink to do the pop up window
Function GeneratePicPopUp( i_path, i_filename )
if fs.FileExists( Server.MapPath( strURLPath & "t_" & i_filename ) ) then
iThumb = strURLPath & "t_" & i_filename
else
Call GenerateThumbnail( strURLPath, i_filename, iThumb )
end if
Call GetPicInfo( strURLPath & i_filename, iHeight, iWidth )
GeneratePicPopUp = "<a href='show.asp?pic=" & strURLPath & i_filename & "&w=" & _
iWidth & "&h=" & iHeight & "' onclick=""NewWindow(this.href,'name','" & _
iWidth + 20 & "','" & iHeight + 70 & "','no');return false"">" & _
"<acronym title=""" & i_filename & """>" & _
"<img src='" & iThumb & "' border=""0"" alt="" " & i_filename & " ""></acronym></a>" & vbClf & vbCrlf
End Function

'Using ASP-Image, we check the Height and Width of the Picture which
'"sets" the size of the Java pop-up window
Sub GetPicInfo( i_path, o_height, o_width )
Set Image = Server.CreateObject("AspImage.Image")
Image.LoadImage( Server.MapPath( i_path ) )
o_height = Image.MaxY
o_width = Image.MaxX
Set Image = nothing
End Sub

'Generates a thumbnail if one doesn't exist already
Sub GenerateThumbnail( i_path, i_pic, oThumb )

'//This section can be avoided if you set the IIS Permissions to "Everyone - Read/Write/Delete/Execute"
dim file, fileMgr
Set fileMgr = server.createObject("SoftArtisans.FileManager")
'//This login is your "main" CT account that has write permissions everywhere
fileMgr.LogonUser "CRYSTALTECH", "your-login", "your-password", 3
'//
truePath = Server.MapPath( i_path ) & "\"
oThumb = i_path & "t_" & i_pic
Set Image = Server.CreateObject("AspImage.Image")
Image.AutoSize = false
Image.LoadImage( truePath & i_pic )
Height = Image.MaxY
Width = Image.MaxX
if not (Height = 0 or Width = 0) then
if Height > Width then
ThumbHeight = MaxThumbHeight
ThumbWidth = cInt(cInt(Width) / (cInt(Height)/MaxThumbHeight))
else
ThumbWidth = MaxThumbWidth
ThumbHeight = cInt(cInt(Height) / (cInt(Width)/MaxThumbWidth))
end if
Image.ResizeR ThumbWidth, ThumbHeight
Image.FileName = truePath & "t_" & i_pic
Image.CreateButton 5, true

Image.SaveImage
end if
Set Image = Nothing

'//Again, can be avoided
fileMgr.RevertToSelf
Set fileMgr = Nothing
'//
End Sub
%>

Yo no consigo hace q funcione, Si a alguien le vale le paso tambien el otro para que lo use.
  #5 (permalink)  
Antiguo 24/05/2003, 04:38
Avatar de maestro  
Fecha de Ingreso: febrero-2002
Ubicación: España
Mensajes: 2.364
Antigüedad: 22 años, 4 meses
Puntos: 1
Uno de estos 3 componentes que instancias te da problemas, acota tu codigo poniendo algunos 'comentarios y dinos cual es la linea que da el error:

Set fs = CreateObject("Scripting.FileSystemObject")
Set Image = Server.CreateObject("AspImage.Image")
Set fileMgr = server.createObject("SoftArtisans.FileManager")

Naturalemente pregunta a tu proveedor si tienes permisos para usarlos, dependiendo del plan de hosting que tengas contratado quizas algunos componentes no esten disponibles para ti.
__________________
Jose Maria Fernandez
[email protected]
Http://www.expansionweb.net
  #6 (permalink)  
Antiguo 25/05/2003, 05:14
 
Fecha de Ingreso: diciembre-2001
Mensajes: 248
Antigüedad: 22 años, 5 meses
Puntos: 0
El error esta en "line 136"

Y lo otro se lo he preguntado a los del server a ver si puedo usar eso, pero aun no me han contestado... tardan muxo.


gracias
  #7 (permalink)  
Antiguo 25/05/2003, 06:29
Avatar de maestro  
Fecha de Ingreso: febrero-2002
Ubicación: España
Mensajes: 2.364
Antigüedad: 22 años, 4 meses
Puntos: 1
¿Con que proveedor trabajas?.
Quizas alguien sepa algo mas
__________________
Jose Maria Fernandez
[email protected]
Http://www.expansionweb.net
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:24.