Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7171469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:25:14+00:00 2026-05-28T15:25:14+00:00

I have a large web app in vb.net 4.0. Its default namespace is configured

  • 0

I have a large web app in vb.net 4.0. Its default namespace is configured in its project properties. None of the root-level classes in our app are surrounded by namespace declarations.

When I add a .asmx file to the root folder of the website, it compiles fine, but it doesn’t work for some reason (already asked why in other topics). So to get it to work, I try to surround the class declared in the .asmx by a namespace declaration. As soon as I do this, I go from zero compiler errors to about a zillion. My app can’t find ANYTHING in the root namespace. But I haven’t changed any other files, only this .asmx file.

WHY is it behaving this way? How do I prevent it from behaving this way without refactoring the entire app? I would love to blank out the default namespace and add them explicitly around every root-level class, but I’m not sure that would fly with our release manager, and I don’t even know if it would fix the problem…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:25:15+00:00Added an answer on May 28, 2026 at 3:25 pm

    When you add a namespace in VB.net around a class you have to update any references to the namespace.

    As an example. If you add a namespace of Bar around a class named “candy”, and the Root namespace is Foo (can be found in project properties -> Application -> Root namespace) you would now need to add a Import Foo.Bar to any classes that were referencing it.

    So, for the case of your asmx markup file, if your root namespace is Foo, and the namespace wrapper you added to your webservice was Bar you’ll need to update your .asmx mark up to:

    <%@ WebService Language="vb" CodeBehind="HomepageService.asmx.vb" Class="Foo.Bar.HomepageService" %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large project in Vb.net which drives a web browser control around.
I have been working on an ASP.NET/C# web app for some time and its
Greetings, I have a large .Net web app which runs on a farm of
I have a large (as in many pages, objects...) asp.net web app that pegs
I have a large non-Java EE, JSF-based web app project. Our system is layered
I have a large web app, and I think there are a bunch of
I have a large .NET web application. The system has projects for different intentions
I have a web application project that works with a quite large database (over
asp.net c# Our webpage currently contains a rather large web app which causes a
I have an existing large(ish) PHP web app (using Apache and MySQL) which now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.