none
"System.IO.IOException: The directory or file cannot be created." while rendering report from SSRS2008 in .NET2003

    Question

  • I have an application in .Net application in VS2003 that use the RS2008 web services to render the report.
    Well..I am getting an exception while debugging my application in the following line:

     

    "win2k8server.ReportExecutionService rs = new win2k8server.ReportExecutionService();"

     

     

    Below mentioned is a snippet of my code:

    ****************************************************************************************************************************************
     public void reportgenerate()
      {
       
       win2k8server.ReportExecutionService rs = new win2k8server.ReportExecutionService();
       try
       {
        //rs= new ReportExecutionService();

        rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
        
        rs.Credentials = new NetworkCredential("Administrator", "tenretni@793s", "domain");
        rs.Url = "http://win2k8server/Reportserver/reportexecution2005.asmx";
        
        //rs.Url ="http://win2k8server/Reportserver/reportservice2005.asmx";

    *****************************************************************************************************************************************

     

     

    Here I have given the exception that is being thrown:

    *****************************************************************************************************************************************

    The directory or file cannot be created.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.IO.IOException: The directory or file cannot be created.

    Source Error:


    Line 36:         /// <remarks/>
    Line 37:         ///
    Line 38:         public ReportExecutionService() {
    Line 39:             string urlSetting = System.Configuration.ConfigurationSettings.AppSettings["Test2008.win2k8server.ReportExecutionService"];
    Line 40:             if ((urlSetting != null)) {
     

    Source File: c:\inetpub\wwwroot\test2008\web references\win2k8server\reference.cs    Line: 38

    Stack Trace:


    [IOException: The directory or file cannot be created.
    ]
       System.IO.__Error.WinIOError(Int32 errorCode, String str) +723
       System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +888
       System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +45
       System.CodeDom.Compiler.CodeCompiler.GetResponseFileCmdArgs(CompilerParameters options, String cmdArgs)
       Microsoft.CSharp.CSharpCodeGenerator.GetResponseFileCmdArgs(CompilerParameters options, String cmdArgs)
       System.CodeDom.Compiler.CodeCompiler.FromFileBatch(CompilerParameters options, String[] fileNames)
       System.CodeDom.Compiler.CodeCompiler.FromSourceBatch(CompilerParameters options, String[] sources)
       System.CodeDom.Compiler.CodeCompiler.FromSource(CompilerParameters options, String source)
       System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSource(CompilerParameters options, String source)
       System.Xml.Serialization.Compiler.Compile()
       System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
       System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings)
       System.Web.Services.Protocols.SoapClientType..ctor(Type type)
       System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
       Test2008.win2k8server.ReportExecutionService..ctor() in c:\inetpub\wwwroot\test2008\web references\win2k8server\reference.cs:38
       Test2008.WebForm1.reportgenerate() in c:\inetpub\wwwroot\test2008\webform1.aspx.cs:33
       Test2008.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\test2008\webform1.aspx.cs:27
       System.Web.UI.Control.OnLoad(EventArgs e)
       System.Web.UI.Control.LoadRecursive()
       System.Web.UI.Page.ProcessRequestMain()

    *****************************************************************************************************************************************

     

     

    How can this be fixed? All hints appreciated. Thanks

     

     

    Thursday, September 25, 2008 11:56 AM