c# - published reports don't work - Database logon failed Error -


i developing simple web app has 3 reports created on vs 2013, reason reports run fine developer mode, when publish website give me "database logon failed" error. causing this? vs installed on same server publishing reports. have created local admin user same info odbc connection logon user iis authentication, still no luck.

below code:

public partial class openwoswebform : system.web.ui.page     {         connectioninfo epakconnectioninfo = new connectioninfo();          protected void setconnectioninfo()         {              epakconnectioninfo.servername = configurationmanager.appsettings["epak_server_name"];             epakconnectioninfo.userid = configurationmanager.appsettings["epak_user_name"];             epakconnectioninfo.password = configurationmanager.appsettings["epak_password"];         }          private void page_init(object sender, eventargs e)         {              reportdocument report = new reportdocument();             report.load("c:\\delray beach\\delray beach\\reports\\openwosreport.rpt");             setconnectioninfo();             tablelogoninfo crtablelogoninfo = new tablelogoninfo();              foreach (crystaldecisions.crystalreports.engine.table crtable in report.database.tables)             {                 crtablelogoninfo = crtable.logoninfo;                 crtablelogoninfo.connectioninfo = epakconnectioninfo;                 crtable.applylogoninfo(crtablelogoninfo);             }             foreach (reportdocument subreport in report.subreports)             {                 foreach (crystaldecisions.crystalreports.engine.table crtable in subreport.database.tables)                 {                     crtablelogoninfo = crtable.logoninfo;                     crtablelogoninfo.connectioninfo = epakconnectioninfo;                     crtable.applylogoninfo(crtablelogoninfo);                 }             }              openwosviewer.reportsource = report;              openwosviewer.toolpanelview = crystaldecisions.web.toolpanelviewtype.none;         }     } 

thanks

besides "database logon failed", "unable connect: incorrect log on parameters"?

if so, try this: https://stackoverflow.com/a/24578304/2248943

and try these:

  1. kill asp.net proccess (w3wp.exe or aspnet.exe) (it restart) .
  2. if using xsd file, check it's location path in rpt, try "set location" again; if not work, try remove tables , include them ok (this hard-working).

i faced problem many times , each case solved 1 of these actions.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -