New Posts New Posts RSS Feed: Deploying on my local IIS
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Deploying on my local IIS

 Post Reply Post Reply Page  <12
Author
Grappler View Drop Down
Newbie
Newbie
Avatar

Joined: 05-Aug-2009
Location: Scottsdale, AZ
Posts: 18
Post Options Post Options   Quote Grappler Quote  Post ReplyReply Direct Link To This Post Topic: Deploying on my local IIS
    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
?


Edited by Grappler - 28-Aug-2009 at 3:18pm
Back to Top
JoshO View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Location: United States
Posts: 87
Post Options Post Options   Quote JoshO Quote  Post ReplyReply Direct Link To This Post 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.
 
Back to Top
Grappler View Drop Down
Newbie
Newbie
Avatar

Joined: 05-Aug-2009
Location: Scottsdale, AZ
Posts: 18
Post Options Post Options   Quote Grappler Quote  Post ReplyReply Direct Link To This Post 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://*"/>
        <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?
 
 
 


Edited by Grappler - 28-Aug-2009 at 4:17pm
Back to Top
JoshO View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Location: United States
Posts: 87
Post Options Post Options   Quote JoshO Quote  Post ReplyReply Direct Link To This Post 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
 
  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
 
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.
 


Edited by JoshO - 28-Aug-2009 at 5:49pm
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1390
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Grappler View Drop Down
Newbie
Newbie
Avatar

Joined: 05-Aug-2009
Location: Scottsdale, AZ
Posts: 18
Post Options Post Options   Quote Grappler Quote  Post ReplyReply Direct Link To This Post 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.
 


Edited by Grappler - 29-Aug-2009 at 11:38am
Back to Top
Grappler View Drop Down
Newbie
Newbie
Avatar

Joined: 05-Aug-2009
Location: Scottsdale, AZ
Posts: 18
Post Options Post Options   Quote Grappler Quote  Post ReplyReply Direct Link To This Post Posted: 31-Aug-2009 at 8:17am
One final problem and it may have actually been the intial problem too.
 
 
 
here is my current app.config and web.config in a text file
 
Back to Top
JoshO View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Location: United States
Posts: 87
Post Options Post Options   Quote JoshO Quote  Post ReplyReply Direct Link To This Post 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.... /> 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" 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 will trigger a "cross-domain-access" check when they are redirected to http://stratafundtrack.com. Anyone who tries to browse to your 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".
 


Edited by JoshO - 31-Aug-2009 at 12:38pm
Back to Top
Grappler View Drop Down
Newbie
Newbie
Avatar

Joined: 05-Aug-2009
Location: Scottsdale, AZ
Posts: 18
Post Options Post Options   Quote Grappler Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1390
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Grappler View Drop Down
Newbie
Newbie
Avatar

Joined: 05-Aug-2009
Location: Scottsdale, AZ
Posts: 18
Post Options Post Options   Quote Grappler Quote  Post ReplyReply Direct Link To This Post 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/" />
        <add prefix="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://*"/>
        <domain uri="https://*" />
      </allow-from>
      <grant-to>
        <resource include-subpaths="true" path="/"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>
 
 


Edited by Grappler - 01-Sep-2009 at 10:33am
Back to Top
Grappler View Drop Down
Newbie
Newbie
Avatar

Joined: 05-Aug-2009
Location: Scottsdale, AZ
Posts: 18
Post Options Post Options   Quote Grappler Quote  Post ReplyReply Direct Link To This Post 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
 


Edited by Grappler - 01-Sep-2009 at 11:21am
Back to Top
Grappler View Drop Down
Newbie
Newbie
Avatar

Joined: 05-Aug-2009
Location: Scottsdale, AZ
Posts: 18
Post Options Post Options   Quote Grappler Quote  Post ReplyReply Direct Link To This Post 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?
 
Back to Top
JoshO View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Location: United States
Posts: 87
Post Options Post Options   Quote JoshO Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
mlashley View Drop Down
Newbie
Newbie


Joined: 18-Feb-2010
Location: Idaho
Posts: 3
Post Options Post Options   Quote mlashley Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
JoshO View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Location: United States
Posts: 87
Post Options Post Options   Quote JoshO Quote  Post ReplyReply Direct Link To This Post 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).
 
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down