I have been trying to develop a pivot viewer dynamic collection (from sample source code). My environment is IIS 6, Windows server 2003 and VS 2010. The collection works fine from VS2010, but when i publish the service through VS2010, the collection does not load. The main page is shown with only the link to cxml file. I have added the three mime entries and clientaccesspolicy.xml is already copied by VS. Is there something missing in my configuration?
Use Fiddler to check the traffic with the app, where does it get stuck, does it get the .cxml file, can it find the dzi and dsc files?
Did you add dzi and dzc mime types as allowed?
You can see this Stackoverflow question to learn how to do this in IIS 6:
How do I get the Silverlight Pivot Server application to run on IIS 6?
Aslo in case you are using the JIT sample code then in the PivotServer project there is web.config file where there are httpHandler configuration values that are meant to be used when running in VS only.
You should remove those when you're deploying:
The Visual Studio Development Server
uses these httpHandler configuration
values. To run the server under IIS,
comment these handlers so that IIS
will use the duplicate set of handlers
in the system.webServer section below.
<httpHandlers>
<add path="*.cxml" verb="GET" type="PivotServer.CxmlHandler"/>
<add path="*.dzc" verb="GET" type="PivotServer.DzcHandler"/>
<add path="*.dzi" verb="GET" type="PivotServer.DziHandler"/>
<add path="*/dzi/*_files/*/*_*.jpg" verb="GET" type="PivotServer.DeepZoomImageHandler"/>
<add path="*_files/*/*_*.jpg" verb="GET" type="PivotServer.ImageTileHandler"/>
</httpHandlers>
Add a handler to the Loading Fail event and look at the exception?
PivotViewer.CollectionLoadingFailed += new EventHandler< CollectionErrorEventArgs >( PivotViewer_CollectionLoadingFailed );
Related
I'm trying to deploy my web app in my local wwwroot folder, I've deployed it several times successfully but never faced this error before, the error says:
Web deployment task failed. (Failed to create type 'Microsoft.SqlServer.Dac.DacServices'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.)
According to iis.net - ERROR_EXCEPTION_WHILE_CREATING_OBJECT :
ERROR_EXCEPTION_WHILE_CREATING_OBJECT:
Typically, this indicates an issue with validating the providers on the source. For instance, if you’re trying to sync content from a source file share and you do not have access to the file share, you may see this error code. For these types of issues, ensure that you have access to all of the source data you would like to publish from.
May be there is something wrong with my connectionstring :
<connectionStrings>
<add name="HrAndPayroll" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\HrAndPayrollDBA.mdf;Initial Catalog = HrAndPayrollDBA;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
I've no idea about how to get through this error, I've googled it a lot, but no gain :/ Any Help is deeply Appreciated, Thanks in Advance :)
We are envisioning a product that will have a web front end and mobile apps on multiple platforms (Xamarin). I've already turned a breeze angular hot towel example into a web front end. I am tasked with investigating splitting apart the breeze web client and the breeze server back end. The main reason for this is the mobile devs could potentially use breeze sharp to save their objects to the same breeze back end. It seems like a bad idea to have the breeze web client and server coupled so tightly. I duplicated the project and stripped out the necessary parts on each end to decouple them.
The part I can't figure out is how to get them to talk to each other again. I briefly looked into connectionString, but that doesn't seem to be the right answer. Any ideas on how to get them talking again would be appreciated.
Edit: 20140725 14:23
I've been trying to resolve this on and off since yesterday. I looked into connectionStrings in Web.config and found that that was dead end. Another post made me think that appSettings in Web.config.
I found a parameter in config.js named remoteServiceName. The previous value was "breeze/Breeze" I changed it to
'http://localhost:4545/breeze/Breeze'
The web client still fails:
Error retrieving data.Metadata query failed for: http://localhost:4545/breeze/Breeze/Metadata; HTTP response status 0 and no message. Likely did not or could not reach server. Is the server running? Error: Metadata query failed for: 'http://localhost:4545/breeze/Breeze/Metadata'; HTTP response status 0 and no message. Likely did not or could not reach server. Is the server running?'
When I run that link in its own tab I get metadata.
What did I strip out?: The breeze controller, models, repository (c# only), dbcontext, and BreezeWebApiConfig
Edit 20140725 14:52
Sorry I missed the exception before the one mentioned above:
XMLHttpRequest cannot load http://localhost:4545/breeze/Breeze/Metadata. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:53555' is therefore not allowed access.
Thank you to everyone for the clues you provided in the comments!
The first part of the answer I already included in my edits above:
I found a parameter in config.js named remoteServiceName. The previous value was "breeze/Breeze" I changed it to
'http://localhost:4545/breeze/Breeze'
That got the client talking attempting to talk to the remote server.
After that the CORS issue stumped me. The three following links helped me solve this issue:
Using Breeze with a WebApi Service from another domain
WebAPI CORS and Ninject
http://msdn.microsoft.com/en-us/magazine/dn532203.aspx
You have to install the CORS packages. From the microsoft article:
First, in order to get the CORS framework, you must reference the CORS libraries from your Web API application (they’re not referenced by default from any of the Web API templates in Visual Studio 2013). The Web API CORS framework is available via NuGet as the Microsoft.AspNet.WebApi.Cors package. If you’re not using NuGet, it’s also available as part of Visual Studio 2013, and you’ll need to reference two assemblies: System.Web.Http.Cors.dll and System.Web.Cors.dll (on my machine these are located in C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Stack 5\Packages).
The next step was to add a few lines to the config file from the webapi-cors-and-ninject stackoverflow post:
<system.webServer>
<handlers>
</handlers>
<httpProtocol>
<customHeaders>
<!-- Adding the following custom HttpHeader will help prevent CORS from stopping the Request-->
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />
</customHeaders>
</httpProtocol>
Obviously this is a very insecure solution and shouldn't be used for anything other than a development environment.
I am attempting to create a WPF application, using MSCE and Entity Framwork. (I am new to wpf)
In asp.net mvc 3 I have done similar things simply by giving the data context, the database, and the connection string the same name. I try that in wpf and it does not work (instead it creates a SqlExpress database.
How does one use a MSCE 4.0 database with WPF and codefirst? Is there some sort of secret add-in?
Here is some sample code
in the app.config
<connectionStrings>
<add name="ReportingContext" connectionString="provider=System.Data.SqlServerCe.4.0;provider connection string=Data Source=|DataDirectory|\ReportingContext.sdf" providerName="System.Data.EntityClient" />
</connectionStrings>
from the models folder
public class ReportingContext : DbContext
{
...
}
It was a problem with the nuget packages somehow. I deleted all of them, reinstalled and the problem vanished.
I'm trying to deploy a desktop application written on WPF 4.0 that uses SQLite through Entity Framework. So i've changed .config file (absolute path to db -> relative) and copied database file itself to app's directory. It seems to be working fine, but on other PC it's throwing an error during runtime. Supplying System.Data.SQLite.dll and System.Data.SQLite.Linq.dll and/or installing ADO.NET 2.0 Provider for SQLite via exe (http://sourceforge.net/projects/sqlite-dotnet2/files/) didn't help. No additional controls/providers etc. used during development. Am i missing something?
p.s. FW 4.0 is present on client machine because VS2010 was installed there and C:\Windows\Microsoft.NET\Framework\v4.0.30319 exists and is ~400mb.
I had the same problem with SQLite and ADO.NET in WPF Application. I solved it in this way:
I added System.Data.SQLite.dll, System.Data.SQLite.Linq.dll and Sqlite.Designer.dll as reffences in my project.
I did right - click on them -> properties -> Copy Local -> true
I added in App.config this code:
<DbProviderFactories>
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
</DbProviderFactories>
</system.data>
This was all I did, and it's working.
Good Luck !
I developed a DotNetNuke application and hosted it on a web server. When I browse the site, I am getting the following error:
Server Error in '/' Application.
Runtime Error Description: An
application error occurred on the
server. The current custom error
settings for this application prevent
the details of the application error
from being viewed remotely (for
security reasons). It could, however,
be viewed by browsers running on the
local server machine.
Details: To enable the details of this
specific error message to be viewable
on remote machines, please create a
<customErrors> tag within a
"web.config" configuration file
located in the root directory of the
current web application. This
<customErrors> tag should then have
its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web> </configuration>
Notes: The current error page you are
seeing can be replaced by a custom
error page by modifying the
"defaultRedirect" attribute of the
application's <customErrors>
configuration tag to point to a custom
error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly"
defaultRedirect="mycustompage.htm"/>
</system.web> </configuration>
Can any one tell me how to resolve the problem...
The main problem here is that you aren't getting any detail about what the error. Any success achieved while troubleshooting this without exposing some more detail (or knowledge of your setup) is going to be pretty close to pure luck.
I would suggest following the instructions that this default error message is giving you and editing the web. config file. The file is named "web.config" and it lives in the root of the website.
Open the file and search for "RemoteOnly", you should see something that says customErrors mode="RemoteOnly". Change the "RemoteOnly" to "Off" and save the file. The next time you browse to the site you should see a more detailed error message. Please share that with us here in the form of an update to your current post or as a new question (which I recommend, as it technically will be a different question).
Also, I recommend making a backup copy of the web.config file first before making any changes.
You need to check if your ASP.NET is functional. Since you didnt post any details on your web server, i would recommend you check if you have .NET 2.0 installed and your web server is configured to use it.
You can run aspnet_regiis -i in the c:\WINDOWS\Microsoft.NET\Framework\v2.x.x.x. directory to re-register the aspnet modules.
You might also want to check if your virtual directories have the execute permission enabled.
When you say you "developed a DotNetNuke application" I need more information.
Did you develop a DotNetNuke MODULE?
If so, did you install it on a DotNetNuke site that was working before, but isn't now?