简体   繁体   English

我的asmx服务在我的本地机器的iis上运行正常,即win10。 但不适用于Windows Server 2008 r2

[英]my asmx service works fine on my local machine's iis which is win10. but does not work on windows server 2008 r2

I have a asmx web service which is just calls a method below KayitKontrol(). 我有一个asmx web服务,它只是调用KayitKontrol()下面的方法。 That method is using a com object. 该方法使用的是com对象。 It works on my local machine but when it try it on server 2008 it stops at creating com object class Kernel.I have same settings on both iis. 它可以在我的本地机器上运行,但是当它在服务器2008上尝试时,它会在创建com对象类Kernel时停止。我在两个iis上都有相同的设置。 I couldn't figure out for a week. 我想不出一个星期。 I profiled it with fiddler it just doesn't respond giving 504 response. 我用fiddler描述它只是没有回应给出504响应。

I didn't install application server. 我没有安装应用服务器。 Is it something about it? 是它的一部分吗?

private void KayitKontrol()
        {
            using (SqlConnection conn = new SqlConnection("server=" + serverName + ";initial catalog=" +
                                                          dataBase + ";integrated security=false;uid=" +
                                                          sqlUser + ";password=" + sqlPass + ";"))
            {
                try
                {
                    foreach (var el in kasalist)
                        {
                            try
                            {
                                LogYaz("Kasa Kayıt Atılıyor.");
                                Kernel kernel = new Kernel();//stops right here which is com object.
                                Sirket sirket = default(Sirket);
                                Kasa kasa = default(Kasa);
                                sirket = kernel.yeniSirket(TVTTipi.vtMSSQL,
                                    el.Sirket,
                                    "TEMELSET",
                                    "",
                                    netUser,
                                    netPass,
                                    0);
                                kasa = kernel.yeniKasa(sirket);
                                kasa.KsMas_Kod = el.KasaKodu; //Kasa Kodu
                                kasa.IO = "C";
                                kasa.Tip = "C";
                                kasa.Kod = el.CariKodu; //Cari Kodu
                                kasa.Fisno = el.Fisno;
                                kasa.CariHareketAciklama = "Avans ödemesi(e-flow)";
                                kasa.Aciklama = el.Aciklama;
                                kasa.Tutar = el.TlTutar;
                                kasa.Plasiyer_Kodu = "3500";
                                kasa.Tarih = el.Tarih;
                                kasa.DovizTut = el.DovTutar;
                                kasa.DovizTipi = el.Dovtipi;
                                kasa.Islem(TKasaIslem.tkCariOdeme);
                                Marshal.ReleaseComObject(kasa);
                                Marshal.ReleaseComObject(sirket);
                                kernel.FreeNetsisLibrary();
                                Marshal.ReleaseComObject(kernel);
                            }
                            catch (Exception exception)
                            {
                                LogYaz(exception.ToString());
                            }
                            finally
                            {
                                LogYaz("1 kasa kaydı atıldı.");
                            }
                        }
                    }
                }
                catch (Exception exception)
                {
                    LogYaz(exception.ToString());
                }
}

Fiddler can't help you when the BL crashes... :) Anything in the windows event log? 当BL崩溃时,小提琴手无法帮助你... :) Windows事件日志中的任何内容? Where does your log statements (LogYaz) go, anything in there? 您的日志语句(LogYaz)在哪里,其中有什么内容?

I found the problem. 我发现了这个问题。 It was about the identity account in iis application pool settings. 它是关于iis应用程序池设置中的身份帐户。 I set an administrator account there and it is working now. 我在那里设置了一个管理员帐户,现在正在运行。 I am a newbie. 我是新手。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 DirectX 应用程序无法通过 Process.Start 在 Windows Server 2012 R2 上加载,通过 CMD 或在本地计算机上正常工作 - DirectX app unable to load through Process.Start on Windows Server 2012 R2, works fine through CMD or on local machine 我的自定义 MSI 不会安装在 Windows 7 或 Windows Server 2008 R2 上 - My custom MSI will not install on Windows 7 or Windows Server 2008 R2 HTTPListener在四核机器Win 2008 Server R2上崩溃 - HTTPListener crashes on quad core machine Win 2008 Server R2 Microsoft Jet oledb 4.0提供程序未在本地计算机上注册Windows Server 2008 R2 Standard - microsoft jet oledb 4.0 provider is not registered on the local machine Windows Server 2008 R2 Standard 使用 asmx 的简单 helloworld WebService 在 Windows 2008 R2 IIS 7.5 上发布时不起作用 - Simple helloworld WebService using asmx not working when published on Windows 2008 R2 IIS 7.5 在Live Server(Windows Server 2008 R2企业)中,无法使用wkhtmltopdf.exe生成PDF,但可以在本地主机中使用 - In Live Server (Windows server 2008 R2 enterprise) PDF Is Not Generating with wkhtmltopdf.exe, but works in Local Host 使用wkhtmltopdf.exe在Live Server(Windows 2008 R2企业版)中无法生成PDF,但可以在本地主机中使用 - PDF is not Generating in Live Server (Windows 2008 R2 enterprise) with wkhtmltopdf.exe, but works in Local Host Windows Server 2008 R2和IIS7.5中的主机WCF - Host WCF in Windows server 2008 R2 and IIS7.5 WebAPI 2 exports Excel,PDF that corupted when deploy on IIS 7/8 but work normally in IIS 10 on my local machine - WebAPI 2 exports Excel,PDF that corupted when deploy on IIS 7/8 but work normally in IIS 10 on my local machine Ajax自动完成CSS在iis和服务器上工作正常,但在本地计算机上工作不正常 - Ajax Auto complete Css works fine in iis and the server but not in local machine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM