Print Page | Close Window

Deploying on my local IIS

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1434
Printed Date: 28-Mar-2024 at 5:27am


Topic: Deploying on my local IIS
Posted By: Grappler
Subject: Deploying on my local IIS
Date Posted: 20-Aug-2009 at 3:27pm
I am working on deploying my app to my local IIS before i proceed with future 
development.

I am attempting to understand your Chapter 15 Deployment but I find it
confusing. It appears to be for a great deal more than Silverlight.

Is there a simplified version of this for deploying for Silverlight? My IIS
Default Web Site is set up to use port 60000 and I have published my Silverlight
web site to inetpub/wwwroot/mysite. No matter how I configure app.config in the
Silverlight directory when i attempt login via:

App.mDomainModelEntityManager.LoginAsync(cred, Attached, null);

it always give me an error and refers to port 9009?

I establish mDomainModelEntityManager in App.Xaml.cs with

private void Application_Startup(object sender, StartupEventArgs e)
{

mDomainModelEntityManager = new DomainModelEntityManager(false);
this.RootVisual = new PageSwitcher();
}

my app.config is

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core, Version=5.2.1.0, Culture=neutral, PublicKeyToken=287b5094865421c0" />
</configSections>
<ideablade.configuration version="5.00" updateFromDomainModelConfig="Ask" clientApplicationType="Silverlight">
<objectServer isDistributed="true" remoteBaseURL="http://localhost" serverPort="9009" serviceName="EntityService.svc" />
<edmKeys>
<edmKey name="Default">
<probeAssemblyNames>
<probeAssemblyName name="StrataFundTrak, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</probeAssemblyNames>
</edmKey>
</edmKeys>
</ideablade.configuration>
</configuration>

if I change the serverPort="60000", I get a warning about it no longer being in sync with my domain model?

I don't get it.




Replies:
Posted By: JoshO
Date Posted: 20-Aug-2009 at 4:36pm
Some of the confusion is due to the fact that there are 2 app.config files which synchronize by default. The app.config in the domain model and the app.config in the client application prompt you to synchronize due to the setting updateFromDomainModelConfig="Ask" in the <ideablade.configuration> section. If you make a change in the domain model app.config you will get a warning when a build occurs that the config files do not match (not in sync). You can have the changes propagate to the client config file by clicking "Yes" or you can manually make the changes.
The <objectServer> section of the client's app.config file is the one you want to modify in order to connect to the correct port and URL. If your case, you have IIS listening on port 60000 and your application directory is in a subfolder "mysite" which is configured as an application root in IIS. The <objectServer> properties would be:
<objectServer isDistributed="true" remoteBaseURL="http://localhost" serverPort="60000" serviceName="mysite/EntityService.svc" />


Posted By: Grappler
Date Posted: 21-Aug-2009 at 7:08am
Where is the app.config in the domain model located?  I can see and edit the app.config in my Silverlight app, but I don't even see one on the web site side?
 
Just to make sure I hadn't deleted it, I checked your example silverlight app, "FirstSilverlightApp" and could not find an app.config. on the web side there either.
 


Posted By: JoshO
Date Posted: 21-Aug-2009 at 11:47am
Depending on how you designed it you can have multiple configs such as the "NextSilverlightApp" example below:
 
 
The "Web" project only contains a web.config file. The app.config that you need to modify is located in the project folder that also contains the .xaml files. When you get the warning to synchronize your config file with the domain model, you will need to click "No" otherwise your changes will get overwritten and the next time you open the client app.config the serverPort will be back to 9009.
 


Posted By: Grappler
Date Posted: 21-Aug-2009 at 12:37pm
This is YOUR Four Simple Steps example Silverlight example.  My app is set up the same way.  As you can see there is only one app.config and it is in the Silverlight app.  So as far as I can see there is nothing to sync to.  I will try setting the

updateFromDomainModelConfig

but I don't see any other app.config to sync to.
 
I have my app running the way I want it to.  My final step is deploying on GoDaddy.  I will have to have a successful deploy before I will buy this product.
 
I may need help deploying this to GoDaddy.  What kind of services does IdeaBlade provide?
 
 
 


Posted By: JoshO
Date Posted: 21-Aug-2009 at 2:18pm
Ok. Let us use Four Simple Steps as a baseline so we have something common to refer to. The Web tab of the "DevForceSilverlightAppWeb" project properties has a section to configure servers such as the "Visual Studio Development Server" and your local IIS server. We hard-coded the port used by Cassini to "9009". This information is used to programmatically build the <objectServer> properties in the client app.config file.
 
  
 
If you select "Use Local IIS Web server", the "serverPort" property will equal 80 and the "serviceName" will have the virtual directory name appended to it.
 
When you do not want to use the information in the "Servers" section of the Web properties, set the updateFromDomainModelConfig to "No" :
<ideablade.configuration version="5.00" updateFromDomainModelConfig="No" clientApplicationType="Silverlight">
This behavior needs to be emphasized in our code sample documentation and in our Developers Guide. Sorry about the confusion this caused.


Posted By: Grappler
Date Posted: 25-Aug-2009 at 9:26am

I am in the final phase of setting up my Silverlight IdeaBlade web app on GoDaddy.
I have the web site deployed and the SQL database setup on GoDaddy.


(BTW if anyone has questions on the Database Publishing Wizard and GoDaddy, i just went throught it.)

I now need to complete the final magic incantations for IdeaBlade and GoDaddy to work together.

I had changed the web.config on my development platform as follows for IdeaBlade to find my database:

<edmKey name="Default" connection="metadata=res://StrataFundTrak/ServerModelStrata.csdl|res://StrataFundTrak/ServerModelStrata.ssdl|res://StrataFundTrak/ServerModelStrata.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=MACBOOKPRO\SQLEXPRESS;Initial Catalog=StrataFundTrack;Integrated Security=True;MultipleActiveResultSets=True&quot;" containerName="StrataFundTrak.ServerModelStrataContext">
  <probeAssemblyNames>
    <probeAssemblyName name="StrataFundTrak" />
  </probeAssemblyNames>
</edmKey>


and

<connectionStrings>
  <add name="ServerModelStrataContext" connectionString="metadata=res://*/ServerModelStrata.csdl|res://*/ServerModelStrata.ssdl|res://*/ServerModelStrata.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=MACBOOKPRO\SQLEXPRESS;Initial Catalog=StrataFundTrack;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>


in both cases I changed:

DataSource=MACBOOKPRO\SQLEXPRESS

and

Initial Catalog=StrataFundTrack

 

The connection string given to me by GoDaddy is:

Data Source=StrataFundTrack.db.4834072.hostedresource.com; Initial Catalog=StrataFundTrack; User ID=StrataFundTrack; Password='your password';


My current app.config in the client project is:

<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core, Version=5.2.1.0, Culture=neutral, PublicKeyToken=287b5094865421c0" />
  </configSections>
  <ideablade.configuration version="5.00" updateFromDomainModelConfig="Ask" clientApplicationType="Silverlight">
    <objectServer isDistributed="true" remoteBaseURL=" http://localhost - http://localhost " serverPort="9009" serviceName="EntityService.svc" />
    <edmKeys>
      <edmKey name="Default">
        <probeAssemblyNames>
          <probeAssemblyName name="StrataFundTrak, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
        </probeAssemblyNames>
      </edmKey>
    </edmKeys>
  </ideablade.configuration>
</configuration>

I should probably understand exactly what to do, but I hope you can take the time to help me out.  When this is finished,
IdeaBlade will have one more Silverlight/IdeaBlade app to point to.  If there are any specific setting in the Web Tab that need to bet set, I would appreciate info on that too.

 
Thanks
 
Stan Marks


Posted By: JoshO
Date Posted: 25-Aug-2009 at 12:49pm
Hey Stan,
 
I just finished researching GoDaddy's shared hosting. I tried to see if I could find a successful Silverlight deployment but I only found frustration so far. I have another customer attempting to get a WCF service running and IIS did not recognize .svc extentions. This means that GoDaddy did not properly install .NET 3.0 or manually register WCF with IIS. He had to add the mapping to his web.config:
<buildProviders>
<add extension=".svc" type="System.ServiceModel.Activation.ServiceBuildProvider, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</buildProviders>
He also had to resolve a problem that occurs with some shared hosting environments where you get an error "multiple addresses not allowed..."
<serviceHostingEnvironment>
 <baseAddressPrefixFilters>
 <add prefix=" http://MySiteName.com/ - http://MySiteName.com/ " />
 </baseAddressPrefixFilters>
</serviceHostingEnvironment>
 
The big nail in the coffin is GoDaddy's "medium trust" level for .NET web applications. DevForce currently requires full trust as does .NET RIA Services.
 
I will update have to you on the trust issue. Hopefully we can find a way to operate in partial trust mode without stripping away or disabling too many Devforce features.
 


Posted By: Grappler
Date Posted: 25-Aug-2009 at 2:49pm
Do you have any customers that have working Silverlight 3 apps using IdeaBlade on DiscountASP.Net?
 
I am open to suggestions, GoDaddy is just cheap, but I am willing to go where there is a good solution.


Posted By: JoshO
Date Posted: 25-Aug-2009 at 3:31pm
At least I have found some Silverlight success stories for DiscountASP! I just checked their features and they fully support .NET up through 3.5 SP1 as well as full trust mode. I saw mixed reviews as far as support but at least they have a proven platform for Silverlight, WCF and the Entity Framework.
 
We use dedicated servers at MaximumASP.com for high reliablility, scalability and their excellent support. Of course, that comes with a much higher cost.
 
When I have some extra time (right), I am going to try and deploy a sample application at DiscountASP just to see if they live up to the hype. I would not chose any shared hosting platform for a heavily loaded or production critical application.


Posted By: Grappler
Date Posted: 26-Aug-2009 at 9:04am

If you do indeed get a chance to test DevForce at DiscountASP please let me know the results.  I have put in a sales request there asking them if their servers allow full trust.

This is their response:
 
"For Windows 2003, we host all sites in Full Trust.  For Windows 2008, the
default trust is Medium Trust however, because we delegate the trust level
control, you can change this to Full Trust within your web.config or in the
Microsoft IIS 7 Manager. "
 
Since I can set the trust level to full with either the web.config or in IIS 7 Manager, it would seem that this should work with DevForce?

 


Posted By: JoshO
Date Posted: 27-Aug-2009 at 10:24pm
I successfully deployed PrismExplorer at DiscountASP.com :
   http://ideabladene.web705.discountasp.net/PrismExplorer/ - http://ideabladene.web705.discountasp.net/PrismExplorer/
 
I signed up for the Windows 2008/IIS 7 platform. There were a couple of "slap my forehead" errors that I had to correct in my web.config settings.
 
The first one was the <system.webServer> subsection which is contained anywhere under <configuration> tag. This is required for IIS 7 deployments. In my example below, I put this at the section at the very end of my web.config above the closing tag </configuration>  :

<system.webServer>
      <validation validateIntegratedModeConfiguration="false" />
      <modules>
        <remove name="ScriptModule" />
        <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </modules>
      <handlers>
        <remove name="WebServiceHandlerFactory-Integrated" />
        <remove name="ScriptHandlerFactory" />
        <remove name="ScriptHandlerFactoryAppServices" />
        <remove name="ScriptResource" />
        <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </handlers>
  </system.webServer>
 
</configuration>
 
The second setting I actually discussed in the post above...duh !!  [8~b...
 
The <serviceHostingEnvironment> is contained within <system.serviceModel>. I my example below I put this section above <services>  :

  <system.serviceModel>
    <serviceHostingEnvironment>
         <baseAddressPrefixFilters>
          <add prefix=" http://ideabladene.web705.discountasp.net/ - http://ideabladene.web705.discountasp.net/ " />
         </baseAddressPrefixFilters>
    </serviceHostingEnvironment>
    <services>
Of course, please replace the "prefix" value with your own domain name.


Posted By: Grappler
Date Posted: 28-Aug-2009 at 8:47am
Thanks for all the help.  I think I am just about there.  I have my site established on DiscountASP.net with my database installed and I am ready to hook it all up.
 
In the web config as running in my development environment I changed the connection string your template created to show my Data Source and Initial Catalog as shown:
 

<connectionStrings>

<add name="ServerModelStrataContext" connectionString="metadata=res://*/ServerModelStrata.csdl|res://*/ServerModelStrata.ssdl|res://*/ServerModelStrata.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=MACBOOKPRO\SQLEXPRESS;Initial Catalog=StrataFundTrack;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />

</connectionStrings>

I am assuming that I replace the connection stuff with the values supplied by DisountASP.Net
 
Would it be possible to get your complete app.config and web.config to review?
 
When I start my Silverlight app at http://www.stratafundtrack.com - www.stratafundtrack.com , the following error occurs during LoginAsync (note this is the second message, the first just says "Attaching").
 
 


Posted By: JoshO
Date Posted: 28-Aug-2009 at 12:03pm
 In the connectionString above, you will need to remove "Integrated Security=True" and then copy the "User ID" and "Password" with their values from the DisountASP info. Of course, change the Data Source and "Initial Catalog" as well. In the "Data Source" value, just use the server's domain name without the "tcp:".
The app.config is just a few lines, so I will put them here. The web.config will be attached to this post.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core, Version=5.2.1.0, Culture=neutral, PublicKeyToken=287b5094865421c0" />
  </configSections>
  <ideablade.configuration version="5.00" updateFromDomainModelConfig="No" clientApplicationType="Silverlight">
    <objectServer isDistributed="true" remoteBaseURL=" http://ideabladene.web705.discountasp.net - http://ideabladene.web705.discountasp.net " serverPort="80" serviceName="PrismExplorer/EntityService.svc" />
    <edmKeys>
      <edmKey name="Default">
        <probeAssemblyNames>
          <probeAssemblyName name="ModelExplorer.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
          <probeAssemblyName name="ModelExplorer.ModelEF" />
        </probeAssemblyNames>
      </edmKey>
    </edmKeys>
  </ideablade.configuration>
</configuration>

 
Here is the web.config: uploads/3/Web.config.txt - uploads/3/Web.config.txt
I had to add the .txt extension to upload it....



Posted By: JoshO
Date Posted: 28-Aug-2009 at 12:15pm
Originally posted by Grappler

When I start my Silverlight app at http://www.stratafundtrack.com - www.stratafundtrack.com , the following error occurs during LoginAsync (note this is the second message, the first just says "Attaching").
 
 


So when you signed up with DiscountASP, you used the domain name "stratafundtrack.com" and the DNS pointer for that domain name is mapped to the IP Address that DiscountASP gave you ?
Otherwise, you need to use the "Alternative URL" that is listed in your DiscountASP control panel and copy it into your app.config's "serverName". Also, I recommend creating a subfolder off of the root and make it an "Application" through the DiscountASP control panel. Use that folder name in the app.config's "serviceName" value.



Posted By: Grappler
Date Posted: 28-Aug-2009 at 12:39pm
No Joy!
 
I still get the same error show above.  It is possible to have my app.config and web.config evalutated?
 
app.config
 
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core, Version=5.2.1.0, Culture=neutral, PublicKeyToken=287b5094865421c0" />
  </configSections>
  <ideablade.configuration version="5.00" updateFromDomainModelConfig="No" clientApplicationType="Silverlight">
    <objectServer isDistributed="true" remoteBaseURL=" http://stratafundt.web705.discountasp.net - http://stratafundt.web705.discountasp.net " serverPort="80" serviceName="EntityService.svc" />
    <edmKeys>
      <edmKey name="Default">
        <probeAssemblyNames>
          <probeAssemblyName name="StrataFundTrak, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
        </probeAssemblyNames>
      </edmKey>
    </edmKeys>
  </ideablade.configuration>
</configuration>
 
 
 
 
http://www.ideablade.com/forum/uploads/554/web.config1.txt - uploads/554/web.config1.txt
 
 Until deployment, all the DevForce documentation has been excellent.  I did not have to make even one forum post or contact IdeaBlade.  Deployment has been very frustrating.  I am a Desktop app developer with very limited experience in deploying web sites or web apps.  I am willing to zip up the whole thing and send it to IdeaBlade.  Silverlight is an excellent transition for desktop app developers to move into web apps and DevForce has been an excellent tool for the DB backend.  I just can't get it deployed out of my Visual Studio 2008.
 
I am even willing to give you my login and password to DiscountASP.Net.  I need to get this done.
 
 


Posted By: Grappler
Date Posted: 28-Aug-2009 at 3:03pm
I installed Fiddler but it is new to me.  At the error in Fiddler the detail is:
 

<body>

<div id="header"><h1>Server Error in Application "STRATAFUNDTRACK.COM"</h1></div>

<div id="server_version"><p>Internet Information Services 7.0</p></div>

<div id="content">

<div class="content-container">

<fieldset><legend>Error Summary</legend>

<h2>HTTP Error 404.0 - Not Found</h2>

<h3>The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.</h3>

</fieldset>

</div>

<div class="content-container">

<fieldset><legend>Detailed Error Information</legend>

<div id="details-left">

<table border="0" cellpadding="0" cellspacing="0">

<tr class="alt"><th>Module</th><td>IIS Web Core</td></tr>

<tr><th>Notification</th><td>MapRequestHandler</td></tr>

<tr class="alt"><th>Handler</th><td>StaticFile</td></tr>

<tr><th>Error Code</th><td>0x80070002</td></tr>

</table>

</div>

<div id="details-right">

<table border="0" cellpadding="0" cellspacing="0">

<tr class="alt"><th>Requested URL</th><td>http://stratafundt.web705.discountasp.net:80/clientaccesspolicy.xml</td></tr>

<tr><th>Physical Path</th><td>E:\web\stratafundt\htdocs\clientaccesspolicy.xml</td></tr>

<tr class="alt"><th>Logon Method</th><td>Anonymous</td></tr>

<tr><th>Logon User</th><td>Anonymous</td></tr>

</table>

<div class="clear"></div>

</div>

</fieldset>

</div>

 

I am no expert, but it looks like it cant find

http://stratafundt.web705.discountasp.net:80/clientaccesspolicy.xml - http://stratafundt.web705.discountasp.net:80/clientaccesspolicy.xml
?


Posted By: JoshO
Date Posted: 28-Aug-2009 at 3:35pm

You are using a shared hosting environment and cannot ever use "localhost". Since your dns domain is "stratafundt.web705.discountasp.net" and "localhost" is a separte domain, you are attempting cross-domain communication.


- <service behaviorConfiguration="StrataFundTrak.ReportsWCFBehavior" name="StrataFundTrak.ReportsWCF">
- <endpoint address="" binding="basicHttpBinding" contract="StrataFundTrak.IReportsWCF">
- <identity>
  <dns value="localhost" />
  </identity>
  </endpoint>
  <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>

Shared hosting platforms are the most difficult to deploy applications on since you share the IIS server and cannot configure it to your needs. Plus, each hosting company seems to have their own settings you may have to work around. If an application is truly critical, then virtual or dedicated server platforms are the best way to go.
 
Finally, one of the most basic test you can perform is done by browsing to your WCF service file: EntityService.svc
I just tried yours and it successfully started up the service. This means that you have other configuration problems and I am betting that it is your use of the "localhost" domain above which is causing the cross-domain error.
 


Posted By: Grappler
Date Posted: 28-Aug-2009 at 4:16pm
I added a clientaccesspolicy.xml to the web app
 
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="SOAPAction">
        <domain uri=" http://*/ - http://*"/ >
        <domain uri="https://*" />
      </allow-from>
      <grant-to>
        <resource include-subpaths="true" path="/"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>
 
I cleaned up any localhost references
 
now I get:
 
 
I login to the entity service by
 

        private void Attach()
        {
            LoginButton.Visibility = Visibility.Collapsed;
            var cred = new LoginCredential("demo", "demo", "demo");
            WriteMessage("Attaching ...");
            App.mDomainModelEntityManager.LoginAsync(cred, Attached, null);
        }
        private void Attached(LoginEventArgs args)
        {
            if (args.Error != null)
            {
                WriteMessage(args.Error.Message);
            }
            else
            {
                WriteMessage("Attached");
                LoginButton.Visibility = Visibility.Visible;
            }
        }

 
The error message we are seeing is the one in Attached
I could not find any good documentation on the LoginCredential parameters, so I have continued to use what was in the example.  Are these parameters causing the error?
 
 
 


Posted By: JoshO
Date Posted: 28-Aug-2009 at 5:25pm
You are now beyond my help. I am not a developer so the error does not mean anything to me. Sorry.
I will see if anyone can look at this but it will not happen today since everyone else has gone home for the day.
The only thing I can offer I found by "googling" the error which is how most of the .NET answers are:
In your debuglog.xml I see that you are using "NDC serializer" and the Prism Explorer app is using "DC serializer":
  Your log -
     
2009-08-28 16:00:46 IdeaBlade.EntityModel.Server EntityServerHost::ConfigureServiceHost Using NDC serializer
2009-08-28 16:00:46 IdeaBlade.EntityModel.Server EntityServerHost::ConfigureServiceHost EntityServer is using the SilverlightFaultBehavior
2009-08-28 16:00:46 IdeaBlade.EntityModel.Server ServerHostFactory::CreateServiceHost EntityServer listening on http://stratafundtrack.com/EntityServer.svc - http://stratafundtrack.com/EntityServer.svc
 
  My log -
2009-08-28 17:08:52 IdeaBlade.EntityModel.Server EntityServerHost::ConfigureServiceHost Using DC serializer
2009-08-28 17:08:52 IdeaBlade.EntityModel.Server EntityServerHost::ConfigureServiceHost EntityServer is using the SilverlightFaultBehavior
2009-08-28 17:08:52 IdeaBlade.EntityModel.Server ServerHostFactory::CreateServiceHost EntityServer listening on http://ideabladene.web705.discountasp.net/PrismExplorer/EntityServer.svc - http://ideabladene.web705.discountasp.net/PrismExplorer/EntityServer.svc
 
From your error, it looks like there is a serialization type mismatch but I don't know where in the code to look. You are also using SOAP for something that caused one of your errors earlier but I don't know if you completely resolved it. Finally, in your web.config you have a service "StrataFundTrak.ReportsWCFBehaviour" using "basicHttpBinding" but you have not referenced the "bindingConfiguration" name in the <bindings>.
I'm sorry I can't get you passed the error but I hope I have given you something to dig into or one of your peers may have posted an answer you can google or bling over the weekend.
 


Posted By: kimj
Date Posted: 28-Aug-2009 at 6:08pm
I was just reading through this thread and haven't gone home yet, so I'll jump in.
 
The NDC serializer should definitely NOT be used with Silverlight applications.   The clientApplicationType="Silverlight" setting in the web.config is what tells DevForce not to use the NDC serializer but to instead switch to the DC serializer.  (There's also an override, UseDCS="true", which can be placed on the <objectServer> tag.  In a functioning Silverlight application this flag is not needed.) 
 
I'm a little confused why NDC is on for you, however, since your web.config1.txt file shows the correct setting.  Your debuglog (which BTW is visible to anyone, which is good for us right now) also shows a license violation occurring.  It's likely the license error is fouling everything else up, so let's try to solve that.  Check that the bin folder contains all the necessary IdeaBlade assemblies, plus any assemblies of your own.  The IdeaBlade assemblies are -
  - IdeaBlade.EntityModel
  - IdeaBlade.EntityModel.Server
  - IdeaBlade.EntityModel.Edm
  - IdeaBlade.Linq
  - IdeaBlade.Core
  - IdeaBlade.Validation
  - IdeaBlade.EntityModel.Web (optional)
 
Also make sure that the assembly holding the Object Mapper generated Domain Model is both listed in the <probeAssemblyName> element and is available in the bin folder as well.  If this assembly is your web project assembly, then there's also the possibility that the DLL deployed to bin does not correspond to what will be dynamically compiled by IIS based on your .svc, .asax and .aspx files.  If Josh is still around hopefully he can help with this issue if this turns out to be the problem.


Posted By: Grappler
Date Posted: 29-Aug-2009 at 9:45am

I appreciate all the effort, but I think it is time to backup and punt.  I am going to deploy your FirstSilverApplication from the sample files.  This will take all my code out of the deployment operation and will give me training on just deploying at DiscountASP.net.  I will keep notes if you want them.

 
The punt was successful!.  Since I was able to deploy your FirstSilverApplication, I just started my project from scratch, built the entity model and then copied in my xaml files and code.  I have a feeling it has to do with the byte[] transfer stuff or the DevExpress XtraReport that is attached via WCF that i have not yet put back into the app yet.  I will let you know.
 
Thanks,  looks like it was all on my side.
 


Posted By: Grappler
Date Posted: 31-Aug-2009 at 8:17am
One final problem and it may have actually been the intial problem too.
 
EntityService works for http://stratafundtrack.com/ - http://stratafundtrack.com but fails for http://www.stratafundtrack.com/ - http://www.stratafundtrack.com or just http://www.stratafundtrack.com - www.stratafundtrack.com  or even http://stratafundt.web705.discountasp.net - http://stratafundt.web705.discountasp.net
 
 
here is my current app.config and web.config in a text file
 
  http://www.ideablade.com/forum/uploads/554/IdeaBlade.txt - uploads/554/IdeaBlade.txt


Posted By: JoshO
Date Posted: 31-Aug-2009 at 12:37pm
I googled and found 2 things that might help.
   This is the recommended clientaccesspolicy.xml for DiscountASP, your policy file filters on http headers equal "SOAP":

clientaccesspolicy.xml: 

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="*">
        <domain uri="*"/>
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

The second possible problem is your <baseAddressPrefixFilters> in the web.config only allows URLs with a base of "stratafundtrack.com". According to MSDN docs and posts, you need to add multiple <add prefix= http://blahBlah.... - http://blahBlah.... /> entries if your application's WCF service will be started from more than one base address.

Typical Silverlight applications and WCF Services are accessed by a link or shortcut and therefore, you would have control over what is used as the base address which should match what you entered into the app.config file's "remoteBaseURL" value. Of course, if you want to provide for someone manually entering the URL which may or may not include "www" or might be prefixed with "https" instead of "http", then you need to provide either a wide-open "clientaccesspolicy" or a specific one that lists all of the possible URL addresses that you want to allow.
Since you used "remoteBaseURL=" http://stratafundtrack.com - http://stratafundtrack.com " in your app.config, any connection to your application will be directed to that base URL which means that a client who tries to connect to http://www.stratafundtrack.com - http://www.stratafundtrack.com will trigger a "cross-domain-access" check when they are redirected to http://stratafundtrack.com - http://stratafundtrack.com . Anyone who tries to browse to your http://stratafundtrack.com/EntityService.svc - http://stratafundtrack.com/EntityService.svc  will trigger a <baseAddressPrefixFilters> check.
 
It almost seems like you need a Space Shuttle Mission Control checklist just to launch your app and that complex checklist must also match your environment. Anything less will typically result with your application "blowing up".
 


Posted By: Grappler
Date Posted: 31-Aug-2009 at 5:04pm
Ya, I now have a pre-flight check list for running local vs deployed.
 
I have one last problem.  I am use WCF to run reports at the server that will be saved as files on the server.
 
Right now my web.config has the following:

<serviceHostingEnvironment aspNetCompatibilityEnabled="false">

If the aspNetCompatibilityEnabled is set to true, your EntityService blows up on LoginAscyn().
 
I need to set it to true to be able to use

HttpContext.Current.Server.MapPath("~/Images/")

otherwise HttpContext.Current is null.

This was actually the initial error condition that started this thread.

Can you change the EntityService to allow this to be true?


Posted By: kimj
Date Posted: 31-Aug-2009 at 5:54pm
DevForce Silverlight has supported aspNetCompatibilityEnabled set to true since version 5.1.1. 
 
What error are you now seeing with LoginAsync()?  You originally reported a problem with looking for port 9009, which I'm assuming is no longer the problem.


Posted By: Grappler
Date Posted: 01-Sep-2009 at 10:29am
Per your suggestion I added "add prefix="http://www.stratafundtrack.com/" />"
to my <baseAddressPrefixFilters>

    <serviceHostingEnvironment aspNetCompatibilityEnabled="false">
      <baseAddressPrefixFilters>
        <add prefix=" http://stratafundtrack.com/ - http://stratafundtrack.com/ " />
        <add prefix=" http://www.stratafundtrack.com/ - http://www.stratafundtrack.com/ " />
        </baseAddressPrefixFilters>
    </serviceHostingEnvironment>

 

I had to remove it because EntityService could not be found.  Any more ideas?
"The remote server returned an error: Not Found"
 
I added a clientaccesspolicy.xml
 
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="SOAPAction">
        <domain uri=" http://*/ - http://*"/ >
        <domain uri="https://*" />
      </allow-from>
      <grant-to>
        <resource include-subpaths="true" path="/"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>
 
 


Posted By: Grappler
Date Posted: 01-Sep-2009 at 10:46am
Hold the phone.  It works now that I have removed the extra prefix.  Maybe the clientaccesspolicy.xml fixed it.
I am now 100% deployed at DiscountASP.net
Thank you for all the help
 


Posted By: Grappler
Date Posted: 02-Sep-2009 at 11:25am

Running Safari on a Mac seems to work ok.  Running FireFox on a Mac I get a [CrossDomain] error with LoginAscyn().

Any ideas?
 


Posted By: JoshO
Date Posted: 02-Sep-2009 at 2:28pm
Sorry, we don't do any testing on Mac. Firefox may not recognize "clientaccesspolity.xml". I bet someone has already run into this issue with IIS 7 and Firefox/Mac. You could probably google/bling the answer.


Posted By: mlashley
Date Posted: 24-May-2010 at 6:37pm
Any more progress on the partial trust issue on GoDaddy?

I've followed this blog post with some success: http://www.edoverip.com/edoverip/index.php/2009/01/30/running-wcf-on-godaddy/

Now I get this error:

Stack Trace:


[SecurityException: That assembly does not allow partially trusted callers.]
   IdeaBlade.EntityModel.Server.RemoteEntityService..ctor() +0


Posted By: JoshO
Date Posted: 24-May-2010 at 7:34pm
The "Server" component of DevForce uses some .NET Framework assemblies that Microsoft requires "full trust" mode in order to use them. This is not a problem for shared hosting providers like DiscountASP and MaximumASP and this is never a problem for dedicated or virtual dedicated hosting plans (even from GoDaddy).
 



Print Page | Close Window