IIS ASP.NET Website using a web service compilation error - asp.net

I am having the same exact problem described here:
Web service Compilation Error
But the answer is not detailed enough for me to try a fix. I cannot find a bin folder.
I connected to a web service using Add Service Reference in visual studio. I copied the entire folder to the IIS wwwroot folder including the App_WebReferences folder which was automatically added when adding the service reference.
Running the site right from visual studio works great.
Any help would be great. I'm using IIS 7.5.
UPDATE to show error:
FlightWS is the reference name I gave to the service when I connected it using the 'Add Service Reference' and pasted in the url of the wsdl file.
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'FlightWS' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 13: protected void Page_Load(object sender, EventArgs e)
Line 14: {
Line 15: FlightWS.AccountType user = (FlightWS.AccountType)Session["user"];
Line 16: if (user != null && !user.Equals(null))
Line 17: {
Source File: c:\inetpub\wwwroot\ServiceClient\Index.aspx.cs Line: 15
Show Detailed Compiler Output:
Show Complete Compilation Source:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34237

Related

Running Default ASP.NET version 4.0 web Application gives - Server Error in '/'Application

Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Root element is missing.
Source Error:
[No relevant source lines]
Source File: D:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config Line: 0
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
How to fix "Root element is missing." when doing a Visual Studio (VS) Build?
Make sure that your web.config isn't empty. It needs a <configuration> element at the root.

Could not load type 'NavigateWebApp.Global'

Recently we have moved our project to web app and everything is good but suddenly I do not know when I am trying to debug my application its showing me the following error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'NavigateWebApp.Global'.
Source Error:
Line 1: <%# Application Codebehind="Global.asax.cs" Inherits="NavigateWebApp.Global" Language="C#" %>
Source File: /global.asax Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4971; ASP.NET Version:2.0.50727.4971
I am sure that there are no build errors.
This is probably caused by your 'NavigateWebApp.Global' class/namespace not being available in the location you've specified.
Check where you define this and ensure it's accessible to the Global.asax page.
The root of the problem is your Global.asax file is referencing a class which no longer exists (or at least at the location you have specified). Simple fix is to update the Inherits attribute with the fully qualified path to your Global.asax class name (which you will find in the Global.asax.cs file).

Web service Compilation Error

I have a problem with a web service. I add a web service reference to my project. I use this service in many pages. It is working correctly, no problems in VS but I copy App_WebReferences folder's files and Web.Config file to ISS path. But it is not working.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'InterkomLaboratuar' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 22: InterkomLaboratuar.Service1SoapClient _sistemTip = new InterkomLaboratuar.Service1SoapClient();
Source File: c:\Inetpub\wwwroot\MedulaV3\diyaliz02\Istemler.aspx.cs Line: 22
How can i solve this problem please help..
Copy Bin folder to IIS. You are missing some assemblies.

Why can't my app load MvcApplication?

I am having trouble running my asp.net mvc 2 app. using VS2010 ASP.NET Development Server.
error displayed in browser:
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'PrototypeB.MvcApplication'.
Source Error:
Line 1: <%# Application Codebehind="Global.asax.cs" Inherits="PrototypeB.MvcApplication" Language="C#" %>
Source File: /global.asax Line: 1
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
global.aspx.cs:
namespace PrototypeB
{
public class MvcApplication : System.Web.HttpApplication
{
...
Please copy paste the namespace in Global.asax file, right click on Global.asax and choose 'View Markup' to see it
https://forums.asp.net/t/1559469.aspx/1?Could+not+load+type+MvcApplication1+MvcApplication+
I just fixed the same problem just by copy pasting and recompiling solution.

Configuration Error on custom config section -- could not find the file specified?

This has worked fine locally for months and just broke on deployment to the server (discountasp). I'm developing with .net 3.5 and asp.net mvc. I've previously successfully hosted asp.net mvc applications on this same account (but without the config section).
I have a custom config section set up in my web.config file that's causing the following error on load:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: An error occurred creating the configuration section handler for SCConfig: The system cannot find the file specified.
Source Error:
Line 179:
Line 180: <SCConfig>
Line 181: <authentication>
Line 182: <groups Administrators="Administrator" Auditors="Auditor" Auditor_Supervisors="Auditor Supervisor" Auditor_Externals="External Auditor" Biz_Users="Business User"/>
Source File: E:\web\irstagelert\htdocs\web.config Line: 180
Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074
The part of the web.config where I define the config handler is:
<section name="SCConfig" type="com.lerteco.SoxCompliance.ConfigHandler.CustomTagHandler, com.lerteco.SoxCompliance.ConfigHandler"/>
I've played with a few different iterations of the type, but they all produce the same error message as above.
The top of the class file is:
namespace com.lerteco.SoxCompliance.ConfigHandler
{
[Flags]
public enum GroupCodes
{
....
}
public class CustomTagHandler : IConfigurationSectionHandler
{
public object Create(object parent, object configContext, XmlNode section)
{
And I've confirmed that on the host the /bin/ directory contains both the com.lerteco.SoxCompliance.ConfigHandler.dll and ....pdb files.
Thanks for any help,
James
Jacob was right; it wasn't the handler file itself, but an error being generated from within the handler.
I ended up writing code and moving around return statements until I found the problem.
Specifically, I created an RSACrytpoServiceProvider() and got the error detailed in this posting RSACryptoServiceProvider CryptographicException System Cannot Find the File Specified under ASP.NET .
James

Resources