[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Namespace Reference in inline aspx page issue

Posted on 2010-01-06
4
Medium Priority
?
926 Views
Last Modified: 2013-12-17
Afternoon all i was hoping someone would be able to help me with this issue:

I have an in-line aspx page that i have written to be a status page for an F5 Load Balancer which needs to reference the system.messaging namespace to do status checks on an MSMQ server i constantly receive the error: CS0234: The type or namespace name 'Messaging' does not exist in the namespace 'System' (are you missing an assembly reference?).

Would much appreciate any assistance if possible thanks.
0
Comment
Question by:Grant Spiteri
  • 3
4 Comments
 
LVL 9

Expert Comment

by:magicdlf
ID: 26196778
In your project, Add Reference, Find System.Messaging, add it, compile again.
The System.Messaging is not included for web application by default, that's why you need to add it.
0
 
LVL 9

Author Comment

by:Grant Spiteri
ID: 26196909
My apologies i didn't make it clear that this needs to be a stand alone web page
0
 
LVL 9

Author Comment

by:Grant Spiteri
ID: 26197109
I have looked at the following also but still to no avail

http://authors.aspalliance.com/remas/ASP.NET/VFAQNET/ImportVsAssembly/
0
 
LVL 9

Accepted Solution

by:
Grant Spiteri earned 0 total points
ID: 26197209
The only work around i could find was the following:

- Create a web.config for the single aspx file that looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.web>
    <compilation debug="true">
      <assemblies>
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
      </assemblies>
    </compilation>
  </system.web>
</configuration>

- ensure that <%@ Import Namespace="System.Messaging" %> is above the page directive.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question