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


Post New Web Links

System.IO.FileNotFoundException: The Web application

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :C#
 

Hi,

I have a webservice method that should create a web part. However, the code gives the below error. But the URL is actually correct!

System.IO.FileNotFoundException: The Web application at https://mysite.com/ 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.

Here is my code...

[WebMethod]
    public void CreateTempWebPart(string ClientName)
    {
      // check registry for site url
      string URL = @"https://mysite.com/" + ClientName;

      SPSecurity.RunWithElevatedPrivileges(delegate()
      {
        using (SPSite spSiteTest = new SPSite(URL))
        {
          SPWeb web = spSiteTest.OpenWeb();
          web.AllowUnsafeUpdates = true;

          using (SPWeb spWebTest = spSiteTest.OpenWeb())
          {
            SPWebPart


View Complete Post


More Related Resource Links

'System OutOfMemory Exception' while using rdlc in Windows application

  
hi Everyone , I am Using Reporting Service (.rdlc) in my Windows application , i am getting Error System OutOfMemory Exception Like "an error occured during local report processing An Unexpected error occured in Report Processing Exception of type 'System OutOfMemory Exception'Was Thrown " what to do Please anyone help me ... Advance Thanks Anilmarnal

Imports System.Data.SqlServerCE on Web application

  
Hi everybody, Can we import System.Data.SqlServerCe namesapce to web application? I tried to add The SqlServerCe namespace from AddReference dialog but it didnt show. And I have tried to install compact framework 3.5 but it still the same not show. My requirements are Login to the website and then create a database[.sdf] on the mobile device. Then connect to the .sdf file to retrieve info and display on my webpage. The window mobile device is running on Window CE 5.0 OS. And I'm using MS Visual Studio 2005.   HELP!!!!!!HELP!!!!!!     LEENO

"System.ArgumentException: Font '?' cannot be found" during application start up. Any ideas?

  
We have couple of users that get this error when they run our application.  I have never seen this problem before. Client says fonts are installed and Microsoft Sans Serif font is there as well. Also he states that user has Read permissions to %SytemRoot%Fonts folder. Any suggestions or ideas how to fix this problem will be appreciated. Thank you.  Here is the stack:   Exception: System.ArgumentException: Font '?' cannot be found.   at System.Drawing.FontFamily.GetGdipGenericSansSerif()    at System.Drawing.FontFamily.get_GenericSansSerif()    at System.Drawing.SystemFonts.get_DefaultFont()    at System.Windows.Forms.Control.get_DefaultFont()    at System.Windows.Forms.Control.get_Font()    at System.Windows.Forms.Control.AssignParent(Control value)    at System.Windows.Forms.Control.ControlCollection.Add(Control value)    at Bloomberg.SmartClient.Hosting.ErrorControl.InitializeComponent() in C:\Projects\Source\Client\ApplicationHosting\ErrorControl.cs:line 218    at Bloomberg.SmartClient.Hosting.ErrorControl..ctor(String appTitle, Boolean inPanel, Exception exception) in C:\Projects\Source\Client\ApplicationHosting\ErrorControl.cs:line 119    at Bloomberg.SmartClient.Hosting.ApplicationHost.OnDisplayError(ApplicationDescription appDescription, Excepti

"System.ArgumentException: Font '?' cannot be found" during application start up. Any ideas?

  
We have couple of users that get this error when they run our application.  I have never seen this problem before. Client says fonts are installed and Microsoft Sans Serif font is there as well. Also he states that user has Read permissions to %SytemRoot%Fonts folder. Any suggestions or ideas how to fix this problem will be appreciated. Thank you.  Here is the stack: Exception: System.ArgumentException: Font '?' cannot be found.   at System.Drawing.FontFamily.GetGdipGenericSansSerif()    at System.Drawing.FontFamily.get_GenericSansSerif()    at System.Drawing.SystemFonts.get_DefaultFont()    at System.Windows.Forms.Control.get_DefaultFont()    at System.Windows.Forms.Control.get_Font()    at System.Windows.Forms.Control.AssignParent(Control value)    at System.Windows.Forms.Control.ControlCollection.Add(Control value)    at Bloomberg.SmartClient.Hosting.ErrorControl.InitializeComponent() in C:\Projects\Source\Client\ApplicationHosting\ErrorControl.cs:line 218    at Bloomberg.SmartClient.Hosting.ErrorControl..ctor(String appTitle, Boolean inPanel, Exception exception) in C:\Projects\Source\Client\ApplicationHosting\ErrorControl.cs:line 119    at Bloomberg.SmartClient.Hosting.ApplicationHost.OnDisplayError(ApplicationDescription appDescription, Exception err

System.BadImageFormatException:is not a valid Win32 application

  
We are facing problem while migrating a .Net 2.0 application 64 Bit OS Windows Server 2003.The error is  as below:"is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) " 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.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)the application is running fine on 32 Bit OS windows Server 2003.Can any one provide any possible soution to the above problem.thanksNikhil

System.IO.FileNotFoundException: Could not load file or assembly 'System.EnterpriseServices

  
Hi, I am getting the following error with a WPF/C# application on one of the machines that we run the application on. The application works fine on other machines. I compared the "System.EnterpriseServices.dll" file on the machine that throws the error with the dll file on the machine that works fine. I did not any differences. We are using .NET 4 (client profile) framework on XP/x86. Can someone please provide some clue as to why the error is thrown on one of the machines? System.IO.FileNotFoundException: Could not load file or assembly 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'    at System.Data.Common.ADP.IsSysTxEqualSysEsTransaction()    at System.Data.Common.ADP.NeedManualEnlistment()    at System.Data.OleDb.OleDbConnection.Open()    at TDS.MainWindow.initializeDB(String fileWithPath) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the

System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed is returning false sometimes

  
Hi,I have a WPF browser application. I am showing the current application version information whenever client click on a help button.for that i am writing the code as follows.void CreateAboutPopUp(object sender, EventArgs e)        {                        string StringVersion = "Info not available";                       if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)            {                System.Version Version = System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion;                if (Version != null)                    StringVersion = Version.ToString();             }                       string InfoString = "Version: " + StringVersion +  " ;            MessageBox.Show(App.Current.MainWindow, InfoString, "Passiar version information", MessageBoxButton.OK, MessageBoxImage.Information);                    }Works fine in Dev and Test servers and shows tthe vesrion information correctly.But in production server, the vesrion information is not showing up. its showing 'Version: Info not available '. Eventhough all manifest information is lates and available. and is also ClickOnce application.It is happening rarely.Please anybody can help me on this?Thanks in advance.Karuna.PS: My application is FullTrust and it is Checked as ClickOnce Application.

.NET application crashes when computer system wakes up from sleep mode.

  

Need help in understanding this error message generated from mscorlib failing when using threading.  I know the problem is not the code written by me, as the application works fine until the computer system is left idle, say for 30mins and allowed to go into sleep mode then the error manifests itself, about a minute later when the computer wakes from sleep mode, the application will perform its tasks and then this error is generated.


This could be a problem with System.Net.NetworkInformation.NetworkChange.AddressChangeListener.AddressChangedCallback

Any information given about the error described below is greatly appreciated, and information on how to prevent such errors even more greatly appreciated, or traps and handles it successfully.

 

Kind Regards,

Shelvin.

Details of the error given below:--

{System.Collections.ListDictionaryInternal}

"The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone)."

Source: "mscorlib"

StackTrace: "   at System.Threading.SynchronizationContextSwitcher.Undo()\r\n   at System.Threading.ExecutionContextSwitcher.Undo()\r\n   at System.Threading.ExecutionContext.run

System.Deployment.Application.DeploymentDownloadException on PDB in XBAP

  

Hi.

I am trying to include the pdb for an xbap application in VS 2010 and I am getting download errors when running my xbap.  I check the directory where the files are and the pdb file exists there.  Here is the error output:

PLATFORM VERSION INFO
 Windows    : 6.1.7600.0 (Win32NT)
 Common Language Runtime  : 4.0.30319.1
 System.Deployment.dll   : 4.0.30319.1 (RTMRel.030319-0100)
 clr.dll    : 4.0.30319.1 (RTMRel.030319-0100)
 dfdll.dll    : 4.0.30319.1 (RTMRel.030319-0100)
 dfshim.dll    : 4.0.31106.0 (Main.031106-0000)

SOURCES
 Deployment url   : http://localhost:10000/EEAdmin.xbap
 Application url   : http://localhost:10000/Application%20Files/EEAdmin_1_0_0_0/EEAdmin.exe.manifest

IDENTITIES
 Deployment Identity  : EEAdmin.xbap, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c79b6a703d3f35af, processorArchitecture=msil
 Application Identity  : EEAdmin.exe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c79b6a703d3f35af, processorArchitecture=msil, type=win32

APPLICATION SUMMARY

can't launch the MFC application on AMD64 operating system.

  

Hi,

       I have ported an application from 32 to 64 bit and trying to run on AMD64 OS but it prompts a follwing system error. 

 "Application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."

system error code for this message is 14001.

Also, Windows event viewer displays the following message 

"Dependent Assembly Microsoft.Windows.Common-Controls could not be found and Last Error was The referenced assembly is not installed on your system."

Is it the problem with 64SDK version or 64bit WinXP version.Currently, I have 64-bit WindowXP with build 3790 (SP 1, version 1433) with AMD64 machine. 

Project option under C/C++ tab

/nologo /MTd /W3 /Zi /Od /I "$(PLATSDK)\Include" /I "." /I "..\$(ICE_DIVISION)infslib" /I ".\.." /I "$(DDKXPROOT)\inc\wxp" /D "WIN64" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "MFC_USE" /Fo"Debug64/" /Fd"Debug64/" /FD /Wp64 /EHsc /GS /c

Anbody can help me to reslove this?

Thanks,
Kishore Wani


Publishing new version of XBAP causes System.Deployment.Application.DeploymentException

  

Hello all, I'm currently developing a full trust XBAP. I'm hosting the published release version of the XBAP on my Windows Azure storage account. 

Recently, when I publish a new release version of the XBAP, some users receive a System.Deployment.Application.DeploymentException when trying to access the new version of the XBAP. The previous version of the XBAP worked on their computers no problem.

I did some research that suggest this exception may be caused if the version number of the XBAP is not incremented upon release. (I double checked, the release number IS automatically incremented). I also read I should use mage -cc to clear the cache before building and publishing. I tried both of these solutions to no avail.

If a user receives this error I can get the XBAP to run on their computer if I manually delete the appdata/Local/Apps/2.0/Data...  folder where the XBAP is cached. 

So my question is, how can publishing a new version of the XBAP (with a properly incremented version number) cause the XBAP to stop working on a computer where the previous version ran without error? What could cause the need to delete the appdata/Local/Apps/2.0/Data... folder where the XBAP is stored to fix the problem? And is there any way to ensure that this problem won't happen in the future?

Thanks for your help. The gory exception det

System.Windows.Media.Composition.DUCE.Channel.SyncFlush() error when we open our application in IE 8

  

Experts, please advice.

I have a WPF application developed using Visual Studio 2008 + DotNET 3.5 + Windows XP - SP 3.We have wrapped Our WPF application in Active X and hosting in IE 6 and it is works fine ,recently we migrated to IE 8 .Actually we are launching our app inside a parent application which is Browser based application(developed in java).

When we launch our app in IE 8 and switching between different modules along with our app in parent application our application is crashing.Pls find below stack trace for the problem.

++++++++++++++++++++++++++++++++++++++++++++++++++

Exception from HRESULT: 0x88980406
Exception Stack Trace: 

  at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
   at System.Windows.Media.MediaContext.CompleteRender()
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   a

Sharepoint & SSRS 2008 "System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft

  

my environment as below:

1- SERVER A (SQL server DB 2008 sp1)
2- Server A (SSRS 2008 sp)
3- SERVER B MOSS 2007 sp1
I configured the SSRS to be sharepoint intergated mode but when i  hit the Web Service URL i got the error below:

Reporting Services Error

  • The configuration parameter SharePointIntegrated is set to True but Share Point Object Model cannot be loaded. The error was: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelper..ctor() at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelperFactory.get_ServiceHelper() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. . (rsSharePointObjectModelNotInstalled)

    new SPSite("http://site") gives System.IO.FileNotFoundException

      

    Greetings,

    A colleague of mine has developed a functioning console application that simply performs a little search using an SPQuery object.

    I've created a web service to be called by BDC to do this.

    My web service code fails here:

       using (SPSite site = new SPSite("http://sharepointapp01/sandbox"))

     

    When I attempt to execute the method from a web browser, I get this:

     

System.IO.FileNotFoundException: File not found.

  

While developing a app that makes calls to a network share I have come across a menu item that works if I go to START\RUN then put in the network share address from a client machine; however if I put that link into the app I've created to pull that particular application I get the below error (FileNotFoundException).  What I dont understand is the application that Ive created has approximately 70 menu choices, all of which work except for 2 applications.  Each application has the identical error. 

Why, if I appempt to run the application through the start\run service on my machine does it execute properly but it doesn't if I run it through the application interface?  The other 68 applications run fine through the interface.

Im using VS2010 on my development machine and my client machine is running  Windows 7

 

************** Exception Text **************

   at Microsoft.VisualBasic.Interaction.Shell(String PathName, AppWinStyle Style, Boolean Wait, Int32 Timeout)
   at XXXXX_Menu.Module1.SyncShellCmd(String& CmdStr, Int32& ApplicationFocus)
   at XXXXX_Menu.Form1.ListView5_MouseDoubleClick(Object sender, MouseEventArgs e)
   at System.Windows.Forms.Control.OnMouseDoubleClick(MouseEventArgs e)
   at System.Windows.Forms.ListView

System.IO.FileNotFOundException when trying to doing new SPSite("http://plop.com") request

  

Hi everyone,

I'm currently trying to develop an WCF that must access to a site collection. For debugging, I'm currently running the wcf into an asp.net development server.

But I get a problem when trying to make the new SPSite object to an existing site collection. I get a System.IO.FileNotFound exception from SharePoint.

As I read on different blog post, it seems to comes from a sql right access problem. But I don't know how to configure it to be able to correct this problem.

Could anyone help me please?

Thanks a lot.

-Gaetan-


creating an online help system for a wpf application

  

hi, i'm trying to create an online help system for a wpf application.

the help system should have two main functions.

1.when the user is over a certain control and press the F1 button a CHM file is opened and the appropriate topic is displayed.

2.a What's this? button that changes the cursor to a question mark or whatever and then when a control is clicked the cursor changes back to the way it was and again the CHM opens on the right topic.

for part 1 i managed to find a few examples of how people did it such as these two:

http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/92d55a82-4b45-4e50-845d-56d7a48cbd0b/

http://peteohanlon.wordpress.com/2009/05/01/easy-help-with-wpf/

i tried the second one, it sort of what i was looking for the only problem is that in order to get to the desired topic the selected control should have focused when F1 is pressed, which is kindda problematic, for example when i wanna view the help related to a button i have to click on it first so it would get focus and then press the F1.

i tried using Control.GetC

Categories: 
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