Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 25th, 2005, 10:24 AM
Registered User
 
Join Date: Jun 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madkaikar_ashish Send a message via Yahoo to madkaikar_ashish
Default Error with Global.asax

I have the following error, just can't figure out why ?

Error-
Could not load type 'SomeNameSpace.Global'
<%@ Application Codebehind="Global.asax.cs" Inherits="SomeNameSpace.Global" %>
Code in Global.asax
<Code>


using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;

namespace SomeNameSpace
{
    /// <summary>
    /// Summary description for Global.
    /// </summary>
    public class Global : System.Web.HttpApplication
    {
                  ......
                }

}
</Code>

I also get the following errors
(1)A namespace does not directly contain members such as fields or methods. Global.asax(1)
(2) Newline in constant Global.asax(1):
(3) Syntax error, '"' expected Global.asax(1):

Can any one please tell me what is this all about?..
-ashish





ashish
 
Old February 4th, 2005, 11:41 AM
Registered User
 
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ulver
Default

Are you able to compile your project?

 
Old August 6th, 2006, 09:25 AM
Registered User
 
Join Date: Dec 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

there is many resons for this problem:

1- you should build your solution.
2- you should create the project from IIS if you dose not create the
   projetc from Visual Studio and you copy it to the root folder


i hope there alittle solution of your problem


 
Old August 7th, 2006, 12:03 AM
Wrox Technical Editor
 
Join Date: Dec 2005
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you using ASP.NET 2.0 or 1.1?

Check your curly braces.

If ASP.NET 2.0:
Make sure your Global class is located in the app_code directory.
All namespaces are now rooted in the "global" namespace by default, removing the namespace should fix your problem. See the following link for more details: http://www.eps-publications.com/arti...uickid=0507041

- Adam Kahtava [http://adam.kahtava.com]





Similar Threads
Thread Thread Starter Forum Replies Last Post
Context.clearerror() gives an error in Global.asax madhusrp ASP.NET 2.0 Basics 6 April 12th, 2007 02:12 AM
an error in Global.asax when the page is started lovehorse BOOK: ASP.NET Website Programming Problem-Design-Solution 5 October 17th, 2006 07:22 PM
Global.asax error sivaganesh_naidu ASP.NET 2.0 Professional 2 August 24th, 2006 10:53 AM
global.asax parser error exarkuun General .NET 3 February 24th, 2005 01:56 AM
An Error in Global.asax! Action BOOK: ASP.NET Website Programming Problem-Design-Solution 5 December 23rd, 2004 12:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.