.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Export-SPWeb "cannot find spweb object with id or url" error

Posted By:      Posted Date: September 09, 2010    Points: 0   Category :SharePoint
How do we just export and import a library or a list using Export-SPWeb and Import-SPWeb? I tried exporting just a library with Export-SPWeb, but it throws an error : Could not find an SpWeb Object with Id or URL “http://<server:port>/Shared Documents”. The same thing goes for a simple list like Tasks: "http://<server:port>/Lists/Tasks". Any help would be much appreciated

View Complete Post

More Related Resource Links

SSIS Import/Export Wizard: "Unexpected Unrecoverable Error"

For whatever reason, whenever the SSIS Import/Export Wizard needs to display an error message, it throws up "Unexpected Unrecoverable Error" instead. The three buttons - Abort, Retry, and Ignore - all cause the wizard to close. I see some activity in Process Monitor that looks like DTSWizard.exe is probing around for some System.Web assemblies, and not finding them. I'm running 2008 SP1 on Win 7 x86, and I've reinstalled the client tools and Integration Services. Anybody else seen this issue? Should I file a report on Connect?

export to ecxel error..

HI,     I have one querry which is to be run on sql server 2008 r2.... But while providing the query in export wizard ,It gives me the error at execution time as:- Executing (Warning) Messages Warning: Preparation SQL Task 1: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. (SQL Server Import and Export Wizard)   Warning: Preparation SQL Task 1: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. (SQL Server Import and Export Wizard) Please let me know wat may be the reason for this error..........

Crystal Report Export - Database Logon Failed Error -

 Below is my code in VB.Net.  I am using PUSH method to populate the DataSet.  I use Crystal Report and VS 2003.   I am trying to export a crystal report to a PDF and I am getting a database log on error.   Why would it give me this error since the report is getting its data from the DataSet.  Please help!!!  ---------------------------------------------- Try Dim oStream As New MemoryStream Me.crpt_numIssues.ExportToStream(ExportFormatType.PortableDocFormat) Response.Clear() Response.Buffer = True Response.ContentType = "application/pdf" Response.BinaryWrite(oStream.ToArray()) Response.End() Catch ex As Exception Dim mgsText As String mgsText = "ERROR: An error occured. <br>" + ex.ToString Me.ShowErrorPanel(mgsText) End Try ------------------------------ The error is: CrystalDecisions.CrystalReports.Engine.LogOnException: Database logon failed. ---> System.Runtime.InteropServices.COMException (0x8004100F): Database logon failed. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqCo

Export error in asp.net Badly need Help!!

Hello.. I can display the report ok but when I export to pdf etc i was getting the login failed error.. after speaking with crystal reports they said I should build my report etc in page init and also again on the export button on click event. NOW I am getting the following error. Exception has been thrown by the target of an invocation. Now!!: am I closer to a solution or am I further away?????? can anybody help as this is driving me mad. below is a copy of the code Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Imports System.Data.SqlClient Imports System.IO Public Class PPCReport Inherits System.Web.UI.Page Protected WithEvents exportTypesList As System.Web.UI.WebControls.DropDownList Protected WithEvents exportByType As System.Web.UI.WebControls.Button Private exportPath As String Private myDiskFileDestinationOptions As DiskFileDestinationOptions Protected WithEvents myCrystalReportViewer As CrystalDecisions.Web.CrystalReportViewer Protected WithEvents cR_PPCReport1 As webDevVB.CR_PPCReport Protected WithEvents Menu1 As skmMenu.Menu Protected WithEvents lblMessage As System.Web.UI.WebControls.Label Protected WithEvents crppC11 As webDevVB.CRPPC1 Protected WithEvents FirstPage_button As System.Web.UI.WebControls.Button Protected WithEvents Back_button As System.

Error while export to pdf-Object reference not set to an instance of an object

Hello, I am getting error while rendering the report to pdf in SSRS 2008. This is happening randomly and sometimes I get this error. I have SQL Server 2008 SP1 installed in my system . I installed the cumulative update 1 for SP1 also but no luck. Every time when export to pdf fails, SSRS is creating the dump file in the logs. I have captured the log of this specific error. Please let me know if you have any idea about this.   reportrendering!ReportServer_0-297!1ec4!03/30/2010-10:32:57:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report., ; Info: Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.OnDemandReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.NullReferenceException: Object reference not set to an instance of an object.   at Microsoft.ReportingServices.Rendering.HPBProcessing.Paragraph.get_SpaceBefore()   at Microsoft.ReportingServices.Rendering.RichText.LineBreaker.FlowParagraph(Paragraph paragraph, Directions direction, IntPtr hdc, Single dpiX, FontCache fontCache, FlowContext flowContext, Boolean keepLines, SizeF flowContextSize, Int32& contentOffset)   at Mi

Error Server Unavailable when try to export it to Excel



I am using SSRS 2005 Version 9.00.4035.00

When i run a query and the query results in 105122 row and when i try to export to it excel I get an

Server Application Unavailable

The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

In my group i have added =Ceiling(RowNumber(Nothing)/65000) so that it goes to the next page but it doesnt work


any help will be appreciated




Error opening site using SPSite and SPWeb instances using VS 2010, Win Server 2008 R2


Hi I am trying to open my site using SPSite and SPWeb instances and getting an error message as below-

The Web application at http://url could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

  CODE is -



                    SPSite siteCOll = new SPSite(siteURL);

                    SPWeb oWeb = siteCOll.OpenWeb("url");



I can access site using browser perfectly.

I am running VS as administrator.

I have done permission checking aswell.


please help!





Error occured when using SPWeb or SPSite in webpart


I am creating a custom webpart, in which I have a label control. This label will display the current site URL and here is the code

protected override void CreateChildControls()
            SPWeb wb = SPContext.Current.Web;
            string baseURL = wb.Url.ToString();
            Label lblTitle = new Label();
            lblTitle.Text = baseURL.ToString();

But when I try to use SPWeb or SPSite within CreateChildControl method, I am getting an unexpected error occurred message. Also I have used "using Microsoft.SharePoint;" too.

If suppose I comment those two line my web part is displaying the properly. As below

protected override void CreateChildControls()
            //SPWeb wb = SPContext.Current.W

Error when trying to export gridview to Excel - RegisterForEventValidation can only be called during

I have a pretty basic vb.net page that has textbox control on it and a "generate" button that when clicked, fills a datagrid.  That all works great, but when the user clicks the "Export to Excel" button, I get this error.. RegisterForEventValidation can only be called during Render(); 

Here's my code behind, I thought I included everything I needed...

Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
End Sub

Private Sub ExportToExcel(ByVal strFileName As String, ByVal dg As GridView)
        Response.Buffer = True
        Response.ContentType = "application/vnd.ms-excel"
        Response.AddHeader("content-disposition", "attachment;filename=" & strFileName)
        Response.Charset = ""
        Me.EnableViewState = False
        Dim StringWriter As New System.IO.StringWriter()
        Dim HtmlTextWriter As New System.Web.UI.HtmlTextWriter(Str

Getting error in report when export to excel


Hi all,
I am using local reports(rdlc) files for reports generation in Asp.net
I am getting following error.
Excel Rendering Extension : "Number of rows in the excel sheet exceeded the limit of 65536 rows"
How can i solve this error.


Word Export error when orientation is Landscape in SSRS 2008


Hi there,

        I have created a report in SSRS 2008, In the report properties I have selected Orientation as Landscape but when i Export the report to Word it prints the report on middle of the page and cuts the rest of the report.

Urgent help is needed!!!

Export to Excel big size files (10000 pages) - HTTP Error 401.1



If you attempt to export a file to Excel, the browser hangs for a long time, then begins to request authorization, several times in succession .
Then displays an error message: "you are not authorized to view this page"

Export to Excel gives error before opening file


I have a web page with a gridview control and a button for Exporting to Excel

I get following error when exporting to Excel.

"The fiel you are trying to open, 'someFileName[1].xls, is in a different format than specified by the file extension. Verify that file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"

Clicking Yes opens the file. I would like to avoid showing the above error to the users.

Following code is used from the click event. I've left the commented code here to show what I've tried based on results from internet search. I have Microsoft Office Excel 2007 on local PC.

public static void ToExcel(DataTable dt, string fileName)
			string attachment = "attachment; filename=" + fileName + ".xls";

			GridView gvExcel = new System.Web.UI.WebControls.GridView();
			gvExcel.AutoGenerateColumns = true;
			gvExcel.DataSource = dt;

			//HttpContext.Current.Response.AddHeader("content-disposition", attachment);
			//HttpContext.Current.Response.ContentType = "application/ms-excel";
			HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";

Import-SPWeb, List does not exist error

I have a strange problem with custom lists in an imported site.
After exporting the site in Central Admin by clicking "Export a site or list" and importing it with "Import-SPWeb" (on a different farm), I cannot read or create new items in custom lists in the imported site. However, by code, i.e. using PowerShell or custom Web Parts, I can read items in the list without any problems.

If I click on any item in a list however, I get an error saying "List does not exist. The page you selected contains a list that does not exist.  It may have been deleted by another user."

I guess it has something to do with permissions, since I get an "Access denied" error when trying to create new items through the browser. The permissions settings seem fine in the browser though...

EDIT: This seems to occur only on lists where I have created custom list forms, like Disp and Edit pages. I guess it has something to do with these files. Are any one else having the same problem?

EDIT 2: Correction, this occurs on every list.

SPWeb error on navigation configuration

    Hi. I have a problem regarding the SPWeb error ("Trying to use an SPWeb object that has been closed or disposed and is no longer valid"). I am a site administrator, and we keep gettin that problem on a few sites. After doing some research on the net, they recommend everywhere to not dispose the SPWeb object, but we haven't made no code modifications, so we still have no clue as why this is happening.

    We get the error when trying to access to the AllItems page of a list or document library. We noticed that this only happens when you select 'show navigation under current site' on Site Configuration > Exploration, and there are no other sites created under the current one. Then, if you clic on some list on the 'All Site Content' page, it shows the SPWeb error message.
    The easiest way to solve this was to create empty sites under the ones on which we wanted to choose that navigation configuration, and then hide them. It seems like having a site under itself helps to recover the reference to the SPWeb object.
    I don't know if this is a bug, the masterpage or site templates are corrupted, or maybe it's just like this, and Sharepoint doesn't allows you to choose 'show navigation under current site' when there are no subsites under this one.


Powershell Set-SPWeb Error?


I'm trying to use Set-SPWeb in order to set the Title and Description for a site.

I've visited this article on Technet and MSDN:  http://technet.microsoft.com/en-us/library/ff607732.aspx

I've used Get-Help Set-SPWeb -detailed, which reports pretty much everything in that article above.

According to the article and the available help, an optional parameter is "NAME" which "Specifies the new name of the Web."  But for the Example provided, it gives -Title "My Site Title"

The kicker, and my reason for writing, is that when I use Set-SPWeb with either a -Name parameter as the article says, or the -Title parameter as the example gives, they both kick back at me "A parameter cannot be found that matches parameter name 'name'." (or 'title')

Is anyone out there able to confirm that this is a bug in the documentation ... or give me another way to accomplish this? 


Edited to add:  I had no trouble running this command with the -Description parameter, which works great. I also have no trouble running other Powershell commands such as Import-SPWeb, Export-SPWeb, Get-SPWeb.  So it's not a general Powershell issue. 

Lady_M MCITP SharePoint 2010

SQL Express R2 - Import / Export Data (32-bit) - Excel - Unexpected Unrecoverable Error


Preface - I'm BRAND NEW to SQL! Bought a book and working to learn :) I've have a lot of experience in Access and other msft titles.

I've installed SQL Express 64 bit on Win 7 (64) and I'm trying to setup my 1st table to start practicing running queries on and I’m having nothing but trouble!! I'm trying to use the import / export wizard to import Excel '07 spreadsheet that has a table of data and I CANNOT get through this without crashing! EVERY SINGLE TIME!

My Steps:

1.  Open Wizard

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend