Web Server Error When Adding in Custom Namespace

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
vashts1980
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 98
Joined: Fri Apr 29, 2011 2:56 pm

Web Server Error When Adding in Custom Namespace

Post by vashts1980 » Mon Sep 10, 2012 10:31 am

I have successfully added a web services integration tool to a web site running AC 7.0.7. I am currently adding a slightly modified version of this same tool to another AC 7.0.7 web site. I have all but one piece of the web.config file set up correctly for the DLL I created. However, every time I add the DLL's namespace to the web.config file, it causes a rather unspecific site error. I even tried adding the updated web.config file and the DLL at the same time but I got the same result. I currently have the line that adds the namespace commented out and the site works. Could there be something I'm overlooking?

mtrujillo86
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 34
Joined: Wed Feb 29, 2012 4:45 pm

Re: Web Server Error When Adding in Custom Namespace

Post by mtrujillo86 » Tue Sep 11, 2012 5:38 pm

Can you post the error?

What asp.net framework version is your web site on?

What asp.net framework version is your custom library using?

vashts1980
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 98
Joined: Fri Apr 29, 2011 2:56 pm

Re: Web Server Error When Adding in Custom Namespace

Post by vashts1980 » Wed Sep 12, 2012 9:28 am

Sorry, I meant to post the actual error but I was having some trouble with logging into the site's admin section. This is the error that shows up in the log, since what was displayed to screen was useless...

Code: Select all

web.config(79): error CS0246: The type or namespace name 'NS_WebServe_BSS' could not be found (are you missing a using directive or an assembly reference?)
Asp.net is all set for version 4, I believe. Both of these sites I've mentioned are on the same physical server and everything I'm doing for the one that's giving me errors has already been done without trouble on the other site.

mtrujillo86
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 34
Joined: Wed Feb 29, 2012 4:45 pm

Re: Web Server Error When Adding in Custom Namespace

Post by mtrujillo86 » Mon Sep 17, 2012 3:28 pm

Inside the SOLUTION EXPLORER

Right Click on your Web Project

Go to PROPERTY PAGES
Is the name of the assembly listed? If not, add it.

vashts1980
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 98
Joined: Fri Apr 29, 2011 2:56 pm

Re: Web Server Error When Adding in Custom Namespace

Post by vashts1980 » Fri Sep 21, 2012 10:15 am

Yes, the namespace is listed. If it wasn't the web service reference I'm using wouldn't work.

I've decided to try a different route to this whole issue and I'm rewriting the DLL so that it will be identical between sites and all the differences will be defined within the CONFIG file. That's what should have been done from the beginning but I didn't know my client was going to want to apply this to more than one site when I began the project.

vashts1980
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 98
Joined: Fri Apr 29, 2011 2:56 pm

Re: Web Server Error When Adding in Custom Namespace

Post by vashts1980 » Wed Oct 03, 2012 11:23 am

Ok, so I did my revisions of the code, and it all works fantastically in the original site. However, I'm still getting the same issue again when trying to apply it to another site, and I'm using the exact same DLL file and same assembly references. Here are some screen shots...

Error page returned to the browser:
Image

Entries in the log:
Image

The properties in the Visual Studio project:
Image

The offending section from the web.config file:
Image
(The line is currently commented out. Removing the comments causes the error.)

mtrujillo86
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 34
Joined: Wed Feb 29, 2012 4:45 pm

Re: Web Server Error When Adding in Custom Namespace

Post by mtrujillo86 » Thu Oct 04, 2012 10:23 am

When you say another site, is this a virtual folder or another site in iis? Are both of these sites on the same server?

vashts1980
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 98
Joined: Fri Apr 29, 2011 2:56 pm

Re: Web Server Error When Adding in Custom Namespace

Post by vashts1980 » Thu Oct 04, 2012 2:13 pm

I have reason to believe all four sites are on the same server, as they are all on the same IP address. Since I don't have access to the server itself, I can't be certain. My client does not own the server, they are paying for a hosting service.

vashts1980
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 98
Joined: Fri Apr 29, 2011 2:56 pm

Re: Web Server Error When Adding in Custom Namespace

Post by vashts1980 » Fri Oct 12, 2012 9:32 am

Ok, I have it all figured out. It would appear that, even though all connections to all four of these web sites are pointed to the same IP address, nothing is on the same server, or even in the same physical location. The first site is on a machine with .NET 4.0 and is somewhere in the CST zone, while these other machines appear to be in the PST zone and only have .NET 3.5. Once I reset the project to build for .NET 3.5 the errors went away.

Post Reply