System ArgumentException :The path is not of a legal form.

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<DIV id=intelliTxt style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px <FONT size=2>I cant figure out why I keep getting this error. Ive checked, and I am passing a productID (string) to one of our abstraction functions but then I get an error from a windows method below

first I make this call, then it blows up:
----------------------------------------<WBR>---
JAAlbum = ProductAbstraction.Load(prAudioID, sstore.EStoreID, out created, TransactionAbstraction.GetTransaction())<WBR>;

prAudioID looks like this: AL2460

EStoreID looks like this: 2098

The Load function looks like this:
--------------------------------------

public static Product Load(string EProductID, int EStoreID, out bool Created)
{
return Load(EProductID, EStoreID, out Created, null);
}
public static Product Load(string EProductID, int EStoreID, out bool Created, SqlTransaction tran)

{
Product pr = new Product();
if (tran == null)
pr.LoadSimpleByStoreAndEProductID(EStore<WBR>ID, EProductID);
else
pr.LoadSimpleByStoreAndEProductID(EStore<WBR>ID, EProductID, tran);
if (!pr.IsLoaded)
{
pr = new Product();
pr.EProductID = EProductID;
pr.EStoreID = EStoreID;
pr.Published = true;
pr.ProductSourceID = 1;
pr.EllerCommiPercent = .50m;
pr.LanguageID = 53;
pr.DownloadDeadline = 7;
pr.AllowUAsF = false;
pr.CopyrightYear = 2007;

if (tran == null)
{
pr.Save(1);
}
else
{
pr.Save(1, tran);
}
Created = true;
}
else
{
Created = false;
}
return pr;
}


Heres the definition for LoadSimpleByStoreAndSellerProductID

public void LoadSimpleByStoreAndSellerProductID(int storeID, string sellerProductID)
{
IDataReader dataReader = null;

try
{
// Initialize the database connection
Database db = DatabaseFactory.CreateDatabase();
DBCommandWrapper dbCommandWrapper = db.GetStoredProcCommandWrapper("Pr_Produ<WBR>ctByStoreA<WBR>ndSellerPr<WBR>oductID");

dbCommandWrapper.AddInParameter("@EStore<WBR>ID", DbType.Int32, storeID);
dbCommandWrapper.AddInParameter("@EProdu<WBR>ctID", DbType.String, EProductID);

// Grab the desired users record, if one exists
dataReader = db.ExecuteReader(dbCommandWrapper);

// If the user exists...
if (dataReader.Read()) {
// Populate the member variables
this.LoadCorePropertiesFromReader(dataRe<WBR>ader);
this.isLoaded = true;

this._emptyObject = false;
}
else
this._emptyObject = true ;
}
catch(Exception ex)
{
ExceptionPublisher.Publish(ex, "Company");
throw;
}
finally
{
if (dataReader != null)
{
dataReader.Close();
dataReader.Dispose();
}
}
}

Error:

EE ]20070120 21 37 58 :Error processing the product record. Product skipped. Error:System ArgumentException :The path is not of a legal form.
at SysteIO.Path.nGetFullPathHelper(String pat,Char []invalidPathChar, Char[]whitespaceChars ,Char directorySeparato, Char altDirectorySeparat, Char
volumeSeparator ,Boolean fullCheck,String&newPath )
at SysteIO.Path.GetFullPathInterna(String pat)
at SysteIO.Path.GetFullPath(String pat)
at SysteXml XmlResolver .ResolveUri(Uri baseUr,String relativeU)i

at SysteXml XmlTextReader .ctorString u, XmlNameTable nt )
at SysteXml XmlTextReader .ctorString u)l
at Bl.ConfigConfig.GetValueFromConfig (String ke) in :Project1 1loadsAssembliesloadsConfigConfigcs<WBR>:line31
at Bl.Products.Product.ctor()in :project1.1companyassembliescompany<WBR>products<WBR>product.cs<WBR>:lin161
at Bl.Abstraction.ProductAbstraction.Load(S<WBR>tring SellerProductI,In32 SellerStoreID,Boolean & Created,SqlTransaction tran)in

cprojects1.1companyassembliescompan<WBR>y.abstract<WBR>ionproduc<WBR>tabstracti<WBR>on.csline6<WBR>9
at Operati.jaOperatio.AddNewProduct ExcelWrapper xl ,In32 row ,IWorkerDriver host,String FileExtensi,String ProductType ,String FilePa, String
FileName, Boolean moveFile, SellerStore ssto)in cprojects11 companydata imporjaloadeoperationjaoperati.cs:lin<WBR>419
at Operati.jaOperatio.Star(IWorkerDriver host)in :project1 1loadsdata imporjaloadeoperatiojaoperatio.csline<WBR>325
</FONT></DIV>

View the full article
 
Back
Top