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

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

Could not find a part of the path ... Occuring even if it's not required

Posted By:      Posted Date: August 27, 2010    Points: 0   Category :Windows Application
I have a windows application which will be installed on a client PC. However, when the user tries to run the app, an error is thrown up.   Could not find a part of the path "C:\Documents and Settings\$username$\Application Data\$appName folder$\sample_log.txt   I looked in the code..but could not find any reference to the file named sample_log.txt . There's no code that creates this file. Although, I know, we had in the past created this file for testing purposes and then deleted the code.   Thank You    

View Complete Post

More Related Resource Links

How do I find the file path from a namespace.class name?


I'm programatically looking ito a .aspx file and getting the file class name declared in its CodeBehind. For example, when analyzing myFile.aspx I read in its Page Directive and found its CodeBehind equals "myApplication\myPage.aspx.vb". Then I use the code below:


Dim Assm As System.Reflection.Assembly = System.Reflection.Assembly.LoadFrom("myApplication\bin\myApplication.dll")
Dim ClassType As Type = Assm.GetType("myApplication\myPage.aspx.vb")
' myBaseType = "myApplication.Forms.BasePage"
Dim myBaseType As System.Type = ClassType.BaseType


Now I want to read the BaseFile (class = myApplication.Forms.BasePage). However, to read in this file, I need I need to get its full path instead of its namespace.class hiearchy. In this case, the BasePage is wrapped in a different namespace declaration thus I cannot just change the '.' to '\' in order to get the path.

How can I get the path of BasePage so I can read it? Thank you - Frank

How to Find out Windows service application path from Code ?

Dear frnds, Could you please help me to find out the path of  windows serivce exe ( application path ) from code?   Regards. Sajid P K  

The system cannot find the path specified

I want to run an external command from my c# program and this is how I am running it, but getting the error: "The system cannot find the path specified".Please check my code and debugging details copied below and suggest what I need to fix. Thank You. string MappingCommand = MappingCommandPath + "Mapping.exe /FileName " + HL7FileServerIn + FName;       Process p = Process.Start(MappingCommand);On the debugger I get MappingCommand as: "\\\\csi-myserv-dkv\\DKV\\Projects\\CSIAccessioning\\Altova\\Mapping\\bin\\Debug\\Mapping.exe /FileName C:\\Orders\\ORM2.hl7"    On command prompt when I copy past the above MappingCommand and remove the escape sequences, the following command runs fine.\\csi-myserv-dkv\DKV\Projects\CSIAccessioning\Altova\Mapping\bin\Debug\Mapping.exe /FileName C:\Orders\ORM2.hl7Your help is highly appreciated.

ws-addressing 'Action' required message part not signed exception

I have a WCF client calling a Java-based service. The service vendor is supporting WCF clients. The WCF client binding uses authenticationMode="MutualCertificate", messageVersion="Soap11WSAddressing10" and the message is signed and encrypted (SignBeforeEncrypt). WCF, in this case, is automatically signing all the ws-addressing ( <Action>, <MessageID> and <To> ) headers. The message gets to the service and comes back with what appears to be valid encrypted data in the response BUT the client is throwing a "The 'Action', 'http://www.w3.org/2005/08/addressing' required message part was not signed" exception (mscorlib). Questions: Is there a way to NOT sign the ws-addressing headers in the request message while still using both signing and encryption (X.509 certs)? If the client DOES sign the ws-addressing headers in the request, is there a way to configure WCF to accept UNsigned ws-addressing headers in the response? If the answer is NO on both questions, I guess I will have to ask the service vendor to sign the ws-addressing headers in the response. Thanks.

Upload image to database - couldn't find file path

I'm trying to display images in a GridView (yes, still this...). [edit] Before I can come to that I have to upload some images to the database.I've followed this tutorial for the "upload image to database" code (this worked fine for uploading images, but I don't know if the images were converted to byte):http://aspsnippets.com/Articles/Save-Files-to-SQL-Server-Database-using-FileUpload-Control.aspxand I've followed this tutorial for the "display images in gridview" code (and "retrieve file" from the tutorial below).http://www.aspsnippets.com/Articles/Display-images-from-SQL-Server-Database-in-ASP.Net-GridView-control.aspxIt doesn't quite work, the GridView shows but without imagesNow I'm trying to change the "save file" code according to this tutorial:http://aspsnippets.com/Articles/Save-and-Retrieve-Files-from-SQL-Server-Database-using-ASP.Net.aspxbut I don't understand everything in it. When I try to upload an image I get an error on this line:FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read); //couldn't find file (path to image I tried to upload) What should I do about it?

CrystalReportsException: Load report failed - The system cannot find the path specified

I recently added a Crystal Report to a web application within Visual Studio 2010.  I'm using the Push method with a DataSet, and have a CrystalReportViewer control added to an aspx page.  When trying to test the report locally I'm getting an exception when performing the data binding on the CrystalReportViewer control...-----------------------------------------------------------------------------------------------------------------------------------Server Error in '/TestDevelopment' Application. The system cannot find the path specified. 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.Runtime.InteropServices.COMException: The system cannot find the path specified. Source Error: Line 7: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Line 8: BindReport() Line 9: CrystalReportViewer1.DataBind() Line 10: End Sub Line 11: Source File: C:\Documents and Settings\acwhifield\Desktop\VS_Projects\TestDevelopment\TestDevelopment\a\CR_Rpt_SubSelNotes.aspx.vb Line: 9 Stack Trace: [COMException (0x80004005): The system cannot find the path specified. ] CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(O

Event ID 7000 - The system cannot find the path specified.


This is a very old prolem that i am getting to. First off I went through anywhere from 4 to 6 or more sessions with a Microsoft TECH and it even escalated a couple of levels of TECH support to boot. I can't remember the details specifically. I do know that I've started with gound up (installed/uninstalled NET Framework versions) installs to where I have all the versions installed. The Service doesn't start either automatically nor manual. I tried the patience of the Support people to fix this last error at that time.

I am starting anew to get the NET Framework Service to work properly . I hope I am in the right support forum.


Can't find the correct path on server


hello, i have developped an application localy that can browse excel files, pictures etc... and display them, the thing is, that on my PC when a user upload a picture it will be saved under local disk C:\ and to browse it i will access C:\idpicture and display it, that easly. the problem is when i deployed the application on iis 7.5 it's not working anymore giving me an error saying that the path is wrong or the name of the file is changed etc...

i have understood that i can't put it on local disk C:\ because the picture or the excel file must be shared on all the PC's, so i have created a map network drive (PUBLIC X:\) which is availble on all PC's, that way i will browse in X:\idpicture but that is not working aswell.


my question is: what is the proper path to use to access file on the server (PUBLIC X:\ or C:\) using IIS? 

TreeView in Web Part required webctrl_client folder to have atlease read access for all users


HI All

I am using the TreeView control from the Microsoft.Web.UI.WebControls Namespace to render a treeview in a SharePoint web part. The tree nodes images do not appear (text is rendered) properly until i grant atleast read permissions to Authenticated Users on the webctrl_client folder which has to be places in the web application's virtual directory.

Is there some way I can avoid granting the read permission on that folder to all authenticated users.

If i go ahead with the approach of giving the authenticated users rad permission, will a user loggedin via FBA get the read permission

Thanks in Advance

The Web Part cannot find an InfoPath form in the specified location.



I had published an infopath form which is having managed code and i created a webpart page and used sharepoint 2010 infopath form webpart.

when i am logging in as administrator then i am able to browse the form(i can fill n submit), if i log on as any other user it is giving me the below message.

 The Web Part cannot find an InfoPath form in the specified location. Either the location does not have an InfoPath form associated with it or it is on a different site collection. Modify the Web Part Properties and select a list or library on the current site.

error 1606 when installing, can't find path


I asked this question in the sql server express forum and pasted logs there. Please look if you can help. Thanks


error 1606 when installing, can't find path

Someone please tell me the exact registry key to change to resolve this problem. I was getting this error when attempting to change features so I removed anything having to do with SQL Server. Hey, that takes time! Many things are installed! The install takes time, too! Trial and error, trial and error. I am reinstalling SQL Server 2008 R2 Express from scratch and would like to make a single registry change in advance, have it go through without issue, and be a happy man. Can someone please help. Thanks

Can't find Query Results Web Part

I'm trying to customize my team's sharepoint dashboard for TFS but I can't figure out how to add a new Query Results Web Part.  When I try to add a web part to the page I see two categories (1) Lists and Libraries, and (2) Closed Web Parts.  The WP in question isn't in either category.  Am I missing something?

WPF: If Heineken did MVVM Frameworks Part 4

MVVM is to have an instance of a particular Model (say currentPerson) inside my ViewModel (say PeopleViewModel) which is exposed to the View (say PeopleView). The View binds and edits the Model directly.

This definitely flies in the face of what most people consider to be the holy grail of MVVM pattern, but it's a fairly new pattern, so people are still finding their way with it every day, and this works for me very well. The reason I do what I do, is for the following reasons:

1.I have always had the luxury of being able to write my own UI specific Model classes. I would even do this if I was using some other Model classes first, such as LINQ to SQL or LINQ to Entity Framework. As these classes don't have everything a proper WPF Model class needs in my humble opinion. Though, they are pretty good, as they are Partial classes and use INotifyPropertyChanged/DataContract etc etc
2.I am a pragmatist and I do not like writing code for the sake of writing code. I have seen some MVVM apps where the author has had a Model with 50 properties on it, that are simply repeated in the ViewModel abstraction, where the ViewModel added nothing. On that day I decided I would never do that unless I have to.
3.I honestly see no harm in writing directly to the Model from the View, JUST SO LONG AS if the Model is InValid its data NEVER makes its way to the database. I honestly see no pro

Building Layered Web Applications with Microsoft ASP.NET 2.0 - Part 1

"Building Layered Web Applications" that shows you how to build N-Layer applications with Microsoft ASP.NET 2.0. These articles teach you how to design, build and use custom business objects in your web application. The target audience for this series are developers that are ready to make the switch from using SqlDataSource controls to ObjectDataSource controls with custom business objects. Experience with ASP.NET 2 and C# is necessary while some knowledge about object oriented design certainly helps. The design I am going to show you in these articles is a simplified version of a design you would use in a real world application. It doesn't feature all the necessary functionality your application needs, but instead focuses on the underlying concepts.

Hello World to C# Threading Part 1

In this post we will see how we can implement simple threading. Why do we need threading? When you want you application to do more then one thing at same time, then you need to implement threading. One usual and common scenario would be when your application needs to get data from some other resource like web services and you don't want you application GUI to be freeze during this time. In that sort of case you will run the code to access web services in separate thread so your application GUI won't freeze. The System.Threading namespace .NET provide interfaces to implement multi threading.

Multithreading in .NET Applications, Part 3

Multithreading is a powerful design tool for creating high-performance applications, especially those that require user interaction. Microsoft .NET has broken down the barriers that once existed in creating multithreaded applications. The last two installments of the .NET Nuts & Bolts column were
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