Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,861 members, 7,802,769 topics. Date: Friday, 19 April 2024 at 09:09 PM

Aspx Help Please - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Aspx Help Please (1114 Views)

PHP And Aspx Are Server Side. / '.php' And '.aspx'-lets Compare Both Scripting Langs / Aspx Programming Clues And News (2) (3) (4)

(1) (Reply) (Go Down)

Aspx Help Please by luckyCO(m): 8:44am On Sep 25, 2010
Hi All
I built asp dotnet web page with dotnet 2008 visual studio. I tested working on my local computer but when I upload it will not find my class and it says

F:\hshome\xmobileoffice\xmobileoffice.com\smsapi\checkcredit.aspx.vb(24) : error BC30002: Type 'apifunctions' is not defined.

Any help?
Re: Aspx Help Please by dazz4me: 7:15am On Sep 26, 2010
check that the apiFunction you reference in your application is present and working on d files u uploaded 2 d remote server
Re: Aspx Help Please by seesharp: 7:30pm On Sep 28, 2010
From my experience, I think you used the asp.net website option in visual studio to build your site. Asp.net is developed either as an asp.net website or asp.net web application - both options are available in visual studio.
If you developed it as a web application, then you wont need to upload your source code files (i.e. the .aspx.vb files). You only upload the .aspx files and the resulting .dll file in bin folder but if you developed it as a website, then you must upload both the interface files as well as the source code files for it to work. If not the server engine would not compile and run you website.

I hope this helps.

You can google asp.net web application vs asp.net website to get more info on this
Re: Aspx Help Please by Kobojunkie: 8:34pm On Sep 28, 2010
@Poster, you probably forgot to upload your reference dlls as well. Your Server needs to have access to the 'apifunctions'  types in this case. Is the right dll on the server or not? I don't know what APIFUNCTIONS refer to but if it happens to be some custom dll you are using, you will likely need to make sure they are also installed in the way they are on your local machine, on your server as well.
Re: Aspx Help Please by luckyCO(m): 9:16am On Sep 29, 2010
seesharp:

From my experience, I think you used the asp.net website option in visual studio to build your site. Asp.net is developed either as an asp.net website or asp.net web application - both options are available in visual studio.
If you developed it as a web application, then you wont need to upload your source code files (i.e. the .aspx.vb files). You only upload the .aspx files and the resulting .dll file in bin folder but if you developed it as a website, then you must upload both the interface files as well as the source code files for it to work. If not the server engine would not compile and run you website.

I hope this helps.

You can google asp.net web application vs asp.net website to get more info on this

Thanks for your contribution.
I developed it as a website from visual studio 2008 and I uploaded everything to the server. It worked fine in my local system but when uploaded wasnt working.
Now I copied the class to the same interface but it was working. But I can't continue to copy and paste my class anywhere I want to use them.
The thing is giving me big concern.
I even created a clean code in APIFUNCTION but still the same error.

I even tried a class where clean codes arfe
Re: Aspx Help Please by luckyCO(m): 9:24am On Sep 29, 2010
Kobojunkie:

@Poster, you probably forgot to upload your reference dlls as well. Your Server needs to have access to the 'apifunctions'  types in this case. Is the right dll on the server or not? I don't know what APIFUNCTIONS refer to but if it happens to be some custom dll you are using, you will likely need to make sure they are also installed in the way they are on your local machine, on your server as well.

I uploaded everything found on the local folder to the folder I created on the net.
local folder. Though I hv not seen this kind of challenge before. I didnt use any dll apart from the usuall dotnet dll that asp.net 2.0 comes with.

dazz4me:

check that the apiFunction you reference in your application is present and working on d files u uploaded 2 d remote server

I think I checked it properly
I dont know the rule governing class usage again.
I dont know whether I should configure something else to be able to see my class and use it.

I put the class function in APP_CODE or something like and I referenced correctly, the functions are what I have been using and they are free database and ordinary functions which doesnt have first step initialization data.
Was surprised that it is not working.

Please if you have faced this kind of problem help me out.

All the solutions I saw on the net ends with "it is not working after having tried what u said I should do."
Re: Aspx Help Please by seesharp: 3:25pm On Sep 29, 2010
@luckyCO

Now I copied the class to the same interface but it was working. But I can't continue to copy and paste my class anywhere I want to use them.
The thing is giving me big concern.

Since you developed the project with the asp.net website option, I am afraid you'll have to upload your class files (.aspx.vb) to the web server each time you update them.  I am personally not comfortable with the idea of uploading my "source code" to the web and won't advice anyone to do so.

When I encountered this same issue while working on a site (www.pixtours.com), what I did was to convert the asp.net website to a web application before deploying to the web. When you do so, you'll only have to upload the .dll file in your bin folder, your .aspx files and any other supporting files/folders but not your source (class) code files. I advice that you thread cautiously if you want to follow the conversion approach - create a back up copy of your entire project before conversion just in case something goes wrong. It is much easier to convert if your project is not complex.

here is a link to aid you in conversion
[url]http://msdn.microsoft.com/en-us/library/aa983476%28VS.80%29.aspx[/url]

here is a list of other links to understand deployment options in visual studio
http://www.asp.net/hosting/tutorials/determining-what-files-need-to-be-deployed-vb
http://msdn.microsoft.com/en-us/library/aa730880.aspx#wapp_topic5
http://www.codersbarn.com/post/2008/06/ASPNET-Web-Site-versus-Web-Application-Project.aspx
http://www.asp.net/hosting/tutorials/deploying-your-site-using-visual-studio-vb

Hope this helps.
Re: Aspx Help Please by Beaf: 6:36pm On Sep 29, 2010
Check if you are using namespaces in some of the files in app_code, while others ain't. That sort of mixup can cause the problem you have.
Note that classes in app_code do not need to be in namespaces, its entirly at your discretion. But if you have used namespaces, you must remember to qualify your class instance properly or include the namespace. e.g;

Imports Some_namespace_or_the_other

As a last resort, right click the file in Visual Studio's Solution Explorer, click properties. Check that the build mode for the file is set to, "Compile."
Re: Aspx Help Please by Kobojunkie: 8:26pm On Sep 29, 2010
luckyCO:

I uploaded everything found on the local folder to the folder I created on the net.
local folder. Though I hv not seen this kind of challenge before. I didnt use any dll apart from the usuall dotnet dll that asp.net 2.0 comes with.

Not necessarily referring to what is in the local folder. What is on the server? By the way, can you check event log on the Server? If you can, you could probably find the actual exception message. Post it here if you can. If you do not have access to event log on the server, may I suggest you download and install ELMAH(very good for monitoriing of exceptions) and it should show you the trace on what is going on.
Re: Aspx Help Please by luckyCO(m): 11:23am On Oct 01, 2010
I will do just that, but I saw an exception which I have posted.
Which is saying error BC30002: Type 'apifunctions' is not defined.
Meaning that my site doesnt know or sees my classes.

I will check my log as u said will get back to u.
Thanks
Re: Aspx Help Please by Kobojunkie: 2:35pm On Oct 01, 2010
I did see the error you had earlier but it did not seem to explain what really happened. From experience, I would rely more on what is in log(if at all available) than just a mere message like that one. Sometimes they could lead you the wrong way when searching for a bug or problem.
Re: Aspx Help Please by dazz4me: 10:07am On Oct 04, 2010
what kind of component did u reference in that APIFUNCTION class? if u use a COM+ or .NET Enterprise services, then u have to generate a COM type library from the assembly and register it into the windows registry and COM+ catalog on d remote server before that class can work on d remote server.

dayo4me@gmail.com
Re: Aspx Help Please by luckyCO(m): 7:16pm On Oct 11, 2010
How do I register the components on my site. I don't think there is any option for that to happen on my Control Panel.
I was thinking as long as the site is dotnet framework whatever I used from the said frame work will serve.

Even now I cannot reference any class at all even an empty class.
Re: Aspx Help Please by Beaf: 8:32pm On Oct 11, 2010
luckyCO:

How do I register the components on my site. I don't think there is any option for that to happen on my Control Panel.
I was thinking as long as the site is dotnet framework whatever I used from the said frame work will serve.

Even now I cannot reference any class at all even an empty class.

Instead of just copying files to the server, are you actually publishing it? Under the Build menu item, select Publish Website. Then go to your publish location and copy the files from there to your server.

(1) (Reply)

The Programmer Killed The Artist / Help With Asterisk / Check my Kivy Based App.....

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 34
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.