Hi all,
I´ve downloaded a third-party application wich is basically a Web folder with all the necessary elements to start working. That application is using a SQL Server database (2016 Express) and the server is a Windows 2012 R2 64Bit, the IIS is version
8.5.
The major of the functionalities of the application work fine, but there is a particular one that is crashed:
1. There are several items in a list (Table) with hyperlinks
2. When I clic an item, a second window is deployed, this window has several tabs with information related to the item.
3. One of these tabs enable the user to upload files and relate them to the item, and shows the list of document already uploaded.
4. Uploading files is not a problem, but when I try to download (clic the file in the list) I got the error described bellow.
Please take into account:
* I can't modify the application
* Parameter Enable 32Bit applications is true in Application pool
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 7/21/2016 4:41:45 PM
Event time (UTC): 7/21/2016 4:41:45 PM
Event ID: e1f106225d3c4fa89cb261a98c4ec3c4
Event sequence: 17
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/metas-1-131135928184214955
Trust level: Full
Application Virtual Path: /metas
Application Path: C:\inetpub\wwwroot\metas\
Machine name: WIN-62BOCH0K6TE
Process information:
Process ID: 6800
Process name: w3wp.exe
Account name: IIS APPPOOL\SIGOB
Exception information:
Exception type: COMException
Exception message: Retrieving the COM class factory for component with CLSID {B3D78EC1-33EB-4623-8C3A-13D84C22E00F} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at
GESTION.componentes_metas_downdoc.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Request information:
Request URL: http://52.37.208.12/metas/componentes/metas/downdoc.aspx?tipo=0&codigo_documento=1116&archivo=Xyz
Request path: /metas/componentes/metas/downdoc.aspx
User host address: 186.29.110.10
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\SIGOB
Thread information:
Thread ID: 7
Thread account name: IIS APPPOOL\SIGOB
Is impersonating: False
Stack trace: at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at
GESTION.componentes_metas_downdoc.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
-------------------------------------------------------------------------------------------------------------------------------------------------------
The code of the component highlighted above is:
using Microsoft.VisualBasic.CompilerServices;
using rlaISAPIComun;
using System;
using System.IO;
using System.Runtime.CompilerServices;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
namespace GESTION
{
public class componentes_metas_downdoc : Page
{
[AccessedThroughProperty("form1")]
private HtmlForm _form1;
protected virtual HtmlForm form1
{
get
{
return this._form1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._form1 = value;
}
}
public componentes_metas_downdoc()
{
this.Load += new EventHandler(this.Page_Load);
}
protected void Page_Load(object sender, EventArgs e)
{
this.Response.Cache.SetCacheability(HttpCacheability.NoCache);
// ISSUE: variable of a compiler-generated type
sigComunISAPI sigComunIsapi = (sigComunISAPI) Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("B3D78EC1-33EB-4623-8C3A-13D84C22E00F")));
string string1 = Conversions.ToString(this.Application["ServidorDB"]);
string string2 = Conversions.ToString(this.Application["BaseDeDatos"]);
string string3 = Conversions.ToString(this.Application["UsuarioDB"]);
string string4 = Conversions.ToString(this.Application["ClaveDB"]);
string string5 = Conversions.ToString(Operators.ConcatenateObject(this.Application["RutaCache"], (object) "\\cache\\"));
string str1 = this.Request.QueryString["codigo_documento"];
string str2 = this.Request.QueryString["archivo"];
string str3 = this.Request.QueryString["tipo"];
// ISSUE: reference to a compiler-generated method
string str4 = sigComunIsapi.ExtraerArchivo(string2, string1, string3, string4, string5, "documentos_procal", "documento", "codigo_documento", Conversions.ToInteger(str1), true, true, false);
string str5 = string5 + str4;
string lower = Path.GetExtension(str5).ToLower();
int num = (int) File.GetAttributes(str5);
string path = string5 + str2 + lower;
if (File.Exists(path))
File.Delete(path);
if (File.Exists(str5))
{
File.Move(str5, string5 + str2 + lower);
File.Delete(str5);
}
this.Response.Redirect("..\\..\\cache\\" + str2 + lower);
}
}
}
I'll be grateful if you give me a help.
Best regards.