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 8945133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:10:54+00:00 2026-06-15T12:10:54+00:00

I have a C# website running in IIS. I have few .cs files under

  • 0

I have a C# website running in IIS. I have few .cs files under the directory App_code. I am able to refer them in all *.aspx.cs and *.ascx.cs files. I do not have Visual studio and I need to make my changes manually.

I now need to consume a web service in .aspx.cs file. I generated a proxy class using wsdl.exe and placed it under App_code directory. But I am not able to refer to the file in my aspx.cs file. I get the error

Compiler Error Message: CS0246: The type or namespace name ‘TestSearchProxy’ could not be found (are you missing a using directive or an assembly reference?)

The proxy doesnt have any namespace defined and I am assuming that it is the default namespace. I haven’t added any “using *” in the aspx.cs fiile.

Can someone help me on how to resolve this issue?

Another approach I tried is :

I generated a dll from the proxy file using csc command and placed the dll under bin directory. I am still unable to access the proxy class.

  • 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-06-15T12:10:55+00:00Added an answer on June 15, 2026 at 12:10 pm

    about the first attempt:

    • Check the namespace of the TestSearchProxy and use it explicitly: NameSpace.TestSearchProxy
    • If that doesn’t work try removing the namespace from the Generated proxy code.
    • Try wiping the asp.net temp directory, this will make it recompile the app_code directory from scratch. (which is usually the first thing you try since the IIS hot deploy mechanism is a bit flaky)
      1. stop the IIS service
      2. DEL /S “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files*.*”
    • check for compilation errors in the proxy code, especially if the wsdl.exe you used might be from a newer framework version than the IIS/.net framework deployed in the target platform.

    About the second attempt, (putting the dll in the bin directory):

    • You will need to add a reference to it, you can do that from the web.config file in the root directory of your aspx website:

      <assemblies>

      <add assembly=”AssemblyName , Version=1.0.0.0, Culture=neutral, PublicKeyToken=123456789ABCD1″/>

      </assemblies>

      Or just by adding it to the GAC (gacutil -i dllname.dll).

    • You should also check that that the dll was compiled with the correct version of .net, and in the correct architecture (x86/x64) to avoid conflicts since this might be an old system (No 4.0 clr/ 32bit only).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have several websites running under IIS. For ease lets call them site1
I have an ASP.NET 4 WebForms website running off IIS 7, we have three
I have a ASP.NET Website (.NET 2 IIS 5.1) running on machine A with
I have a website running on a IIS 7.5 server with ASP.NET 4.0 on
I have a website running on a Windows 2003 server on IIS 6, serving
Running IIS 6 with a main website using .net 4. I have many sub
I have a website running on IIS 7 bound to port 80 with 2
I have a website running in IIS 6.0, the website is an asp.net with
This is odd. I have a website running under a .Net 2.0 app pool
I have a website application running in it's own application pool on IIS 7.0.

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.