Can anyone tell me process of embedding Salesforce Visualforce page on ASP.NET page under an iFrame or through any other way, if you have.
SalesForce doesn't support CORS or JSONP. This is deliberate because they want you to use their stuff:
Connected Apps: for communicating with "headless" applications (web services).
Salesforce Canvas: for embedding external applications within a VisualForce page. I am not sure if this works the other way around. Communication (events) between your SalesForce app and your external app is done via JavaScript XHR proxies. I believe this means you may have to modify your existing app to include their JavaScript library.
Both Connected Apps and Canvas apps require security setup and authentication.
I am still trying to figure this out too. The SalesForce Canvas tutorials use applications hosted on Heroku (they acquired Heroku so they push it whenever they can)... although this makes the examples close-ended, it also adds extra steps.
check this out!
there's something called frontdoor.jsp
https://developer.salesforce.com/blogs/developer-relations/2014/03/see-your-visualforce-pages-on-tv-with-chromecast.html
Related
I'm new in ASP.net MVC Single Page Application (SPA). I want to design a system that using SPA concepts.
However, I have a bit confusing on how a system consider design in SPA concept? Is it the system URL must always same although we perform many activities or don't have back function (browser) as it always in one page because only render the necessary HTML part? I did googling on this, still have no idea. Does anyone can explain in more simple way?
Thank you.
One of the main advantages of having an SPA is that because you only have one page and you load all the data at once (or make multiple AJAX calls in the background to get data on demand) your application gives an illusion that there is no post back to the server, making your web application seem like an app.
Using SPAs can potentially improve the user experience of your application.Site speed can be improved but you might have to make a user wait a few seconds to load all the initial data.SPA's are great for touch screen appications, such as kiosks and touch based Point Of Sale systems where the navigation is 100% controlled by the SPA.
SPAs also have a lot of disadvantages like implementing the back navigation in your site.In traditional websites this is not a problem but in an SPA you would need to make very clever use of javascript libraries such as Backbone.js or Angular.js to mimic this functionality.Also search engine functionality of public sites and analytics may be a problem.If your are writing a huge enterprise type of application, you may encounter performance problems.
I would stronly recommend reading Disadvantages of Single Page Applications before you make a decision on whether to use them or not.
A SPA can still have multiple different URLs.
In this case, the server that is hosting the application needs to be configured to direct all paths for a URL to the main index.html page.
The index.html page will load the initial part of the SPA, and if it sees there is a path on the URL beyond /, then it will load the "component" for that path.
A "component" as described here might consist of HTML, JavaScript, and request any data that is requested from external APIs.
Angular is a SPA framework that has built-in support for loading components based on registered URL paths. There are other SPA frameworks, as well.
OK, guys need some advice with runing ASP.Net app inside iframe.
I have a CMS and ASP.Net app which talks to Office 365.
Because I couldn't integrate my app into CMS (authentication issue) I am calling my office app using jQuery Window
Plugin which has two advantages:
I styled the window to look as though its part of the CMS
It has onClose event which I was able to use as a trigger that I need to update UI
Everything works great. Only issue is when user goes to sign in. Because Office API call a remote service it redirects my office app to the authentication page. And this breaks the iframe. Leaving user to stare at a blank dialog window till they get bored.
Prior to discovering that plugin I used normal javascript window.open() which opened up a new browser window for me where everything works fine. But the biggest problem for me is that inside CMS context I can't tell when/if user has finished using my office app. Therefore I have no hooks I can rely on to trigger UI update leaving user to just refresh the page.
Is there anything I can do to get around my problem (apart from integrating my office app with CMS)?
ps:
My office is basically sending HTTP messages across the web to CMS in order to do what needs to be done.
pss:
My office app in turn uses latest Office 365 API to talk to its services.
Apologies guys. Just confirmed that Office 365 is configure not to display inside iframes.
That pretty much leaves only two options:
running a separate browser window
tighter integration with CMS (ideal)
If i developed a desktop application based on CEF (or Webkit). It mean that my GUI is HTML. Now i want take heatmap for my App. The smartest way is using Google Analytic as ga.js. But ga.js available only for public site with URL like http://*** Does anyone have idea how use GA js in local html?
In CEF you can serve content for any scheme using resource handlers. Use CefRegisterSchemeHandlerFactory() to register scheme handler for http scheme and custom domain eg. "myapp.foo". Files can reside on local drive and be accessible through http://myapp.foo/. There is a question whether GA validates this domain. Even if, then you could register scheme handler for a real domain that you own for ex. myapp.com. Content still can be served locally for that domain using resource handler.
I am using basic asp.net web application project template, because I want to move away from MVC into SPA.
Most of my pages will just be basic html files that will interact with the server through ajax calls. That said I want to hide the .html extension, but I don't want to create controllers just to hide this, which is too much of an overkill.
Of another note, I am using Azure as well, so setting this up on IIS directly is not going to work, as I would not be able to scale the administration nicely.
So how can I hide the html extensions without such a heavy layer as an MVC controller?
This sounds like a job for Url Routing
Url Routing allows you to intercept a request and then determine how to service it. It is how MVC does it and has many other useful benefits. If the router isn't able to service it, it falls back to the default ASP.NET pipeline processing, and then IIS.
Can I have a ribbon button launch an aspx ( asp.net ) page? The aspx page needs to inherit authentication and authorization as the logged in Dynamics user.
You can execute custom JavaScript from a ribbon button allowing you to spin up a new browser window pointing at whatever you like.
To inherit security credentials you need to look at setting up federated authentication across both the CRM server and the custom website hosting the ASPX. As you can probably imagine this isn't a trivial task.
You could also look at dropping your website into the custom ISV folder as was the case with CRM 4. However, this approach has been deprecated in CRM 2011 and AFAIK is therefore no longer supported.
As #Konrad pointed out you won't be able to use the Data Service REST API (OData) from your custom web pages as the service is only accessible from web resources hosted within the CRM environment. Server-side you'll be fine against the Org Service.
If you can get away with doing what you need in a web resource I'd highly recommend it as it's a whole lot less work.
I'm not sure you can do that. A while ago, I put in an iframe that I linked to an outside web page and it worked as supposed to except for connecting to the organization data. I just couldn't make that work (I got impatient, to be honest and didn't try all too hard).
The resolution I deployed in the end was to run a web resource, which was run internally on the server, that communicated the data to an outside service.
I'm assuming that the same behavior will follow if you try to open windows/convey data in to/out from the CRM.