Wrox Programmer Forums
|
BOOK: Professional ASP.NET 1.0, Special Edition/1.1
This is the forum to discuss the Wrox book Professional ASP.NET 1.1 by Alex Homer, Dave Sussman, Rob Howard, Brian Francis, Karli Watson, Richard Anderson; ISBN: 9780764558900
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 1.0, Special Edition/1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 18th, 2004, 05:10 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Trrrrrring, yes I guess it does ;)

I guess that the component is not aware of its "Web environment". That is, for all the component knows, it could be used in a desktop app or Pocket PC application as well.

So, the component doesn't know where MapPath comes from, probably doesn't even know what it does.

To successfully tell the component about the fact it's participating in a Web application, you can have it get a reference to the current Http Context, like this:

string myString = System.Web.HttpContext.Current.Server.MapPath("Bla .txt");

Would you mind starting a new thread for a new issue? Makes a thread a bit more on-topic....
Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 18th, 2004, 05:29 PM
Registered User
 
Join Date: Mar 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar:

Thanks for the response. The sample I read that used MapPath was so generic I didn't know it's usage differed by context.

Anyway, I have setup a seperate forum on the subject. Maybe you can stop by and make suggestions.

Thanks

P.S. The title of the topic is error BC30451: Name 'MapPath' is not declared.

 
Old October 23rd, 2004, 05:32 AM
Registered User
 
Join Date: Oct 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,
   I have just joined the the forum, I thought that u all can solve some problem of mine.
    i m using command prompt to compile the asp.net code behind (or may say the code which i write in .vb file)
    first I compile one .vb file then i use the dll of I first .vb file(class) in other .vb file
 for eg
   imports xyz
   'this is the dll which i made using command prompt
    Now I want to use it but I m getting an error
     err:bc30466 namespace or type "xyz" cannot be found
  Please help me with this
    Its preety urgent

regards and thanx in advance
abhishek



 
Old October 23rd, 2004, 08:44 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I am not sure what you're talking about. Where do you get this error? How are you using the DLL? Can you describe your setup in more detail?

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Frantic by Metallica (From the album: St.Anger) What's This?
 
Old December 7th, 2004, 06:58 PM
Registered User
 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,
I am trying to compile my vb.net project from command line using vbc.exe
I have some crystal reports in my project
I am able to compile the project, but the crystal reports give the following error
"Unable to find the report in the manifest resources. Please build the project, and try again. "
I researched a little bit and found out I need to embed these reports in the assembly using the /resource switch in the vbc.exe.
But the resource file needs to be of .res extension.
The only files corresponding to the reports are the .rpt and .vb file created along with it
I included both of them in the reseource switch.But I get the same error.How do I embed the reports in the assembly?
Thanks
Jagruthi

 
Old December 8th, 2004, 02:40 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Jagruthi,

Thanks for your personal message. I answer here if you don't mind.

I think you need to embed your resources using the /res option and then use the fully qualified namespace for the embedded resources. Here's something that worked for me to embed a .bmp file:

/res:ToolboxImages\ContentEditor.bmp,Spaanjaars.Too lkit.ContentEditor.bmp

The first instance of .bmp is the file name, the other the namespace.

Then check out this FAQ to see where and how your resources ended up:

http://Imar.Spaanjaars.Com/QuickDocID.aspx?QUICKDOC=291

Did you also include the associated .vb or .cs files required by the report?

If all else fails, you *could* deploy the .rpt files and then use Server.MapPath to just load them.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Errors Compiling Jiffyman C++ Programming 5 October 16th, 2008 01:27 AM
Need Help ASAP w/Compiling Open Source Game alpine C++ Programming 2 April 11th, 2007 04:04 PM
Errors when Compiling a Class File Jim3 General .NET 1 March 16th, 2005 01:57 AM
errors compiling on beta2 gaid BOOK: ASP.NET Website Programming Problem-Design-Solution 3 February 21st, 2005 12:25 AM
Error in source code compiling angelika J2EE 2 December 29th, 2003 11:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.