.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

WCF on GoDaddy - Compiler doesn't recognize [OperationContract]

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :WCF
I've created a bare-bones WCF service (with just the default DoWork method in order to simplify things) and it compiles and runs just fine on my local computer running Visual Studio. When I deploy the service to my GoDaddy server, I get the following 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 'OperationContract' could not be found (are you missing a using directive or an assembly reference?) Source Error: Line 10: public interface IShtibLuachWcfService Line 11: { Line 12: [OperationContract] Line 13: void DoWork(); Line 14: [OperationContract] Source File: d:\hosting\4541103\html\App_Code\IShtibLuachWcfService.cs Line: 12 Show Detailed Compiler Output: C:\Windows\SysWOW64\inetsrv> "C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe" /t:library /utf8output /R:"C:\Windows\assembly\GAC_MSIL\System.Xml\\System ..Xml.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Services\ 3a\System.Web.Services.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing\\Sy stem.Drawing.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Co

View Complete Post

More Related Resource Links

Compiler doesn't recognize my DataSet


I created a DataSet object in the App_Code directory.
I then created a DataLayer.cs class in the App_Code directory.
In the DataLayer class I am using System.Data.

Yet the compiler does not recognize my DataSet. The error asks me if I am missing a directive or an assembly reference. I dont think I am because intellisense does recognize the DataSet keyword, just not the DataSet that I created. The exact code is posted below, obviously you cannot see the DataSet in the Solution Explorer but trust me, it's there. Its exact name is dsTasks.xsd and it has the attached .xss thing. Also, everything is spelled correctly. Also, I tried using  DataSet ds = new DataSet("dsTasks") but I couldn't do the fill method. Forget that anyway, what I really want to know is why it doesn't even recognize dsTasks! As far as I can tell it is there, it is spelled right, the Date Layer is referenced, the two files are even in the same directory, I have this same thing working in other projects.... so whats up?


Here is the error message:
CS0246: The type or namespace name 'dsTasks' could not be found (are you missing a using directive or an assembly reference?)
It is referring to the dsTasks that I am trying to have the method return.

Compiler-generated scopes for local variable declarations

I was tasked with understanding and fixing a bug on error reporting with foreach iteration variables the other day, and it got me thinking about local variable scoping rules in C# in general. First, the bug.

Setting the default start page in godaddy hosting?


 How do you set the start page with godaddy hosting? I can see no way of doing this! You do not seem to have access to the IIS settings that allow you to change it!

Beginner: this doesn't make sense to me


Do you need and "empty" script tag in the head to run scripts that are in the body?  Also, can you run JQuery scripts if they're in the <head> tag?  The first sample only works if the JQuery script is in the form (and body) tag, not in the head - even if I add $(document).ready(function() { });

This works

<head runat="server">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" />
<script type="text/javascript">
<form id="form1" runat="server">
<a href="">Here is a link</a>
<script type="text/javascript">
$('a').click(function () {
alert("you clicked me!");


This doesn't work.  Notice I removed the second <script> tag from the head

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="serve

Compiler Error Message : CS0006: Metadata file 'System.EnterpriseServices.dll' could not be found


I get this error when i Debug my web application....


I followed these steps.,

  • Ended the aspnet_wp.exe process in the Windows Task Manager
  • Then deleted the application`s folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
  • Then started Visual Studio 2008 again

I also rebooted my system but no use....

Plz help !

Required permissions cannot be acquired when host asp.net 3.5 application in godaddy


I got the following error when click print report button.

Application : asp.net 3.5

Crystal report : 10.5

Host: godaddy

Please help me.


Required permissions cannot be acquired.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Roll Your Own: Create a Language Compiler for the .NET Framework


Joel Pobar presents an introduction to how compilers work and how you can write your own compiler to target the .NET Framework.

Joel Pobar

MSDN Magazine February 2008

{ End Bracket }: Legal Doesn't Think the Way You Do


If you develop software for a large company, you've undoubtedly experienced the joys of dealing with "Legal. " The meetings, the endless explanations, the long waits. I'm here to report from the other side.

Don McGowan

MSDN Magazine March 2006

Advanced Basics: Scaling Up: The Very Busy Background Compiler


One of the features that distinguishes Visual Basic® from the other languages in Visual Studio® is its use of a background compiler (BC). The BC runs from the moment you start up a Visual Basic project until the time you close the last one down.

Matthew Gertz

MSDN Magazine June 2005

C++ Rules: Power Your App with the Programming Model and Compiler Optimizations of Visual C++


Many programmers think that C++ gets good performance because it generates native code, but even if your code is completely managed you'll still get superior performance. In Visual Studio 2005, the C++ syntax itself has been greatly improved to make it faster to write. In addition, a flexible language framework is provided for interacting with the common language runtime (CLR) to write high-performance programs. Read about it here.

Kang Su Gatlin

MSDN Magazine January 2005

Advanced Basics: Building a Progress Bar that Doesn't Progress


In many situations, accurately estimating the length of a certain process (copying a large file, loading data from a server, retrieving files from the Internet) would be both difficult and inefficient.

Duncan Mackenzie

MSDN Magazine October 2004

Still in Love with C++: Modern Language Features Enhance the Visual C++ .NET Compiler


Programmers who have been using C++ for years are wondering where their language is headed with the advent of C# and Microsoft .NET. This article sketches a roadmap of C++ as it is used in the world of .NET. In .NET there are two approaches to C++ code: managed and unmanaged. Unmanaged code doesn't use the CLR, while managed code involves the use of Managed Extensions for C++. This discussion explains both approaches.

Stanley B. Lippman

MSDN Magazine February 2002

Classes created inside App_Code dir is ignored by the compiler



I have the following problem programming in asp .net with visual studio 2008. If I insert a new class file, right clicking on "add new element -> class -> ecc..." directly inside the App_Code directory (or in its any subdirectory) the compiler and the smartTab do not see any custom namespace previously created in other classes, nor from other classes I can find the namespace and the class name defined within the new class file just inserted. The only way I found to correctly insert a new class file is create it right clicking on "add new element... ecc..." not in the App_Code (or sub) directory but rather in the root node with the name of the entire project, and then I can move it in the destination App_Code subdirectory, and it keeps working.

As a matter of facts it seems that is not important where the file IS but rather where I CREATED it: if I created a class from inside the App_Code it does not see anything and it is not seen by any other class, otherwise if I create it right clicking on the root node of the project it works and keeps workng even moving inside any subdir within the project.

I also tried to manually add the App_Code subdirs to the <Compilation> and <codeSubDirectories> tags of the Web.config file, but anything changed with this behaviour.

Does anybody know why?


MVC 2 doesn't display in IE


I started to learn MVC 2, VS 2010 ultimate created MVC application . using file not IIS 7. My application When I hit F5, I get an error.

IN IE bar, I have http://localhost:5388/views/home/index.asp

Then, in the page : The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

request url /views/home/index.

I searched some forums, understood that "views" should not be displayed. I tried http://localhost:5388/home/index.asp, it doesnt work, same error.

Am I missing any config or parameter.

Thanks in advance

Flash player doesn't send cookies while requesting an aspx page



 I'm developing a web-site, that uses SWFUpload for multiple files upload to the server. Page, that uploades files, is accessable only to registered user. Authentication is done via web-forms (authentication mode="Forms" in Web.config). Flash uploades files to special web page - upload.aspx. In IE everything works great, but Flash player in non-IE browser (in Firefox, for example) does not send any cookies to upload.aspx. Because of it no sesion and no authentication information is available in this page.

 I can pass all the information, necessary for uploading, in GET-parameters, which upload.aspx recieve. But this is a serious security hole and I don't want to expose session information. I can pass session identifier in GET-request. But the question is the following: how can I restore session information from the session identifier? How can I make HttpContext.Current.User point to currently logged in user in this case?

Any help will be appreciated.

When I use 'publish', site doesn't work when i post data


Arrgghh, I am so tired of dealing with stuff like this

I've got a project, when I put up on another server I point two sites in IIS6 to it

i have

http://www.main.com  pointing to the folder the files are in


http://www.anotherofoursites.com/main pointing to that same folder in it's own "Virtual Application" or whatever IIS calls it when you put a folder into it's own 

If I just "Build" and push all the files up.. both work without issue and as expected...  but when I use "Publish" to precompile, the site works until I post, and then i get nailed with:

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.

Link goes to next page but url doesn't change?


I have a text input to get a 'roomID' and an ASP button that calls an 'enterRoom' function:

roomID:<asp:TextBox runat="server" ID="roomID"></asp:TextBox>
                <asp:Button ID="Button1" runat="server" Text="Enter Room!" OnClick="enterRoom" />

In my head tags I have my enterRoom Sub:
    <script runat="server">
        Sub enterRoom(ByVal sender As Object, ByVal e As System.EventArgs)
            Server.Transfer("users/room.aspx?roomID=" & Request.Form("roomID"))
        End Sub

Now when I click that button it essentially goes to the right page in all ways but the URL stays as my default.aspx instead of changing to users/room.aspx?roomID=23423. I've tried it in IE and Firefox with the same results. Is this something I'm not understanding about Server.Transfer or why is this happening and how do I fix it?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend