Does Microsoft.ServiceModel.Web only work in GAC?http://forums.asp.net/t/1373588.aspx/1?Does+Microsoft+ServiceModel+Web+only+work+in+GAC+Wed, 04 Feb 2009 17:21:31 -050013735882880163http://forums.asp.net/p/1373588/2880163.aspx/1?Does+Microsoft+ServiceModel+Web+only+work+in+GAC+Does Microsoft.ServiceModel.Web only work in GAC? <p>Hi guys,</p> <p>&nbsp;I created my first WCF RESTful service with just one GetData so I can try, and it works perfectly in localhost, but when I add it to a hosting environment, I get:</p> <p><span></p> <h1>Server Error in '/' Application. <hr color="silver" size="1" width="100%"> </h1> <h2><i>Compilation Error</i> </h2> </span><font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "><b>Description: </b>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. <br> <br> <b>Compiler Error Message: </b>CS0234: The type or namespace name 'ServiceModel' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)<br> </font>&nbsp; <p></p> <p>Does this means that I need to place the dll in the GAC to this work? Shouldn't work in the BIN forlder of my Service?</p> <p>Here is how my service folder looks like:</p> <p>&nbsp;</p> <pre class="prettyprint">Service.svc Service.svc.cs web.config BIN Microsoft.ServiceModel.Web.dll Microsoft.ServiceModel.Web.pdb MyService.dll MyService.pdb PROPERTIES AssemblyInfo.cs</pre> <p>&nbsp; What can I do in order to make this working?</p> <p>&nbsp;</p> <p>Thank you. <br> </p> 2009-01-20T23:08:54-05:002880235http://forums.asp.net/p/1373588/2880235.aspx/1?Re+Does+Microsoft+ServiceModel+Web+only+work+in+GAC+Re: Does Microsoft.ServiceModel.Web only work in GAC? <p>&nbsp;got the problem...</p> <p>&nbsp;</p> <p>I am not configuring the DLL in the web.config file.</p> <p>&nbsp;</p> <p>But how can i add this, what's the code? in &lt;<font color="#a31515" size="2">appSettings</font>&gt;? <br> </p> 2009-01-21T00:32:32-05:002882669http://forums.asp.net/p/1373588/2882669.aspx/1?Re+Does+Microsoft+ServiceModel+Web+only+work+in+GAC+Re: Does Microsoft.ServiceModel.Web only work in GAC? <p>the web dll need not be gaced.&nbsp; Just having it in the bin should be fine.</p> <p>Can you check if you have referenced the web dll correctly?</p> 2009-01-21T20:28:04-05:002888716http://forums.asp.net/p/1373588/2888716.aspx/1?Re+Does+Microsoft+ServiceModel+Web+only+work+in+GAC+Re: Does Microsoft.ServiceModel.Web only work in GAC? <p>I did, and it works fine locally :(</p> <p><font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "></p> <pre>Line 4: using System.ServiceModel;<br>Line 5: using System.ServiceModel.Activation;<br><font color="red">Line 6: using Microsoft.ServiceModel.Web;<br></font>Line 7: <br>Line 8: namespace MyService&nbsp; </pre> </font>and the dll is in the BIN folder.<br> I have no idea what to wrte in the web.config (if I need to write something)<br> <p></p> 2009-01-24T07:20:50-05:002889366http://forums.asp.net/p/1373588/2889366.aspx/1?Re+Does+Microsoft+ServiceModel+Web+only+work+in+GAC+Re: Does Microsoft.ServiceModel.Web only work in GAC? <p>what version of the .net framework is installed on your machine?</p> <p>How are you hosting the service?&nbsp; IIS?</p> <p>Can you give a quick shot to self hosted service and see if the problem is IIS or something else.</p> <p>&nbsp;</p> 2009-01-24T16:57:02-05:002916313http://forums.asp.net/p/1373588/2916313.aspx/1?Re+Does+Microsoft+ServiceModel+Web+only+work+in+GAC+Re: Does Microsoft.ServiceModel.Web only work in GAC? <p>I'm pretty sure there's nothing you need to write in the web.config folder as long as the dll is in Bin.</p> 2009-02-04T17:21:31-05:00