Can I access the "Ti" singleton from a remotely hosted app? - tidesdk

I have a TideSDK app with a main url that is hosted on a server. E.g. http://example.com/myApp.
I am trying to access the Titanium singleton from that code, but it's not defined. Does TideSDK not pass a reference to it to the window object or something?
I haven't found anything in the docs regarding this as I suppose most apps bundle the code within.

The Ti object is not available to any remote server url. This is because of the security policy in place for TideSDK.
The policy in place is to prevent any remote URL to access your entire computer through Ti object. So if you load any url in TideSDK it would not allow them to access your local computer.. and only urls from your own computer will get access to it.

Related

Access Azure Files Share from WebAppService

We are currently moving an old ASP.net web application from a hosted server IIS7 to Azure.
In the current setup the site is accessing a File Server using an UNC path to a shared folder on the file server.
\\file-server\files-client
We do, for now, not want to change this approach since it will substantially complicate the moving process.
We have set up an Azure Storage with File Service and a share in this called files-client
This can be access perfectly from a VM by setting up credentials and accessing it via
\\storageaccount.file.core.windows.net\files-client
But
We really would want to have this site run as a Web App Service since it gives us a number of advantages.
We have set up an App Service, have published the Web Application, and all is running great including DB access etc.
Unfortunately our luck runs out when the Web Application tries to access the file share using
\\storageaccount.file.core.windows.net\files-client\test.jpg
We get an access error:
Access to the path '\\storageaccount.file.core.windows.net\files-client\test.jpg' is denied.
This tells me that the App Service sees the share but is not authorized to access it.
I know that we somehow has to grant the App Service access to this storage, but searching the net intensively tells me that this cannot be done which I simply cannot understand, and hopefully I'm not looking in the right places.
Sp the question is: How do I set up the credentials in the App Service to have it access my Storage share?
Any guidance is much appreciated.
Thanks in advance
The App Service sandbox explicitly does not allow access to the ports necessary for SMB protocol (137/138/139/445).
This article mentions it under Restricted Outgoing Ports: https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox.

My custom Webpage for Oracle Cloud Application can be accessed from anywhere

I programmed (on JDeveloper Studio) a custom page for Oracle Cloud Application R13 and it is working like a charm. I deployed my customization on my Oracle WebLogic Server but I couldn't help to notice the website I created was HTTP and not HTTPS when I opened it from Oracle Cloud Application. On top of that, I also noticed I could access this custom webpage from anywhere (using any device) without any security verification or login as long as I use the same URL with its token.
I would like to know how to make my custom webpage's url not being accesible just with its URL and also make it HTTPS instead of HTTP if possible.
WebLogic Version: 12c
Oracle Fusion Application version: 11.13.18.10.0
JDeveloper version: 11.1.1.7.0
I believe this might have to do something with the WebLogic configuration, since I tested the same java project on Java Oracle Cloud SaaS Extension and it doesn't have this problem. Whenever I try to open that webpage from any other device, it asks me for login credentials. I am currently working with Oracle Java Cloud. (it is not the SaaS extension version) that's why I have this problem.
Have you configured security for your application in JDeveloper? If not then your page and application is considered public and not private.
As for HTTPS, weblogic server uses 2 ports one for HTTP and an other one for HTTPS.
Regards

Deploying asp.net web api to azure app service

Problem: after deploying my asp.net core web api to azure app service I can't get a response from the expected endpoint
Steps followed:
I have an api that works fine when serving from my local machine, developed using Visual Studio Code. (The code for that is here https://github.com/samrae7/blog-api FYI)
I followed the instructions in this video: https://www.youtube.com/watch?v=C8J_CRy2_XA to push the files up to Azure App services. Basically I used the VS Code azure app service extension to create a webapp on azure and push my files.
I can see my files have been pushed to Azure ( by logging in to the portal and looking) but when I navigate to the expected URL of my api, http://sams-blog-api.azurewebsites.net, I get 'site not found'. If I try to send a request to the expected endpoint (I append /api/resource as this is the path of the endpoints on my local machine) I get '404 not found'
So my question is what do I have to do to actually get my api up and running online after pushing the files to azure app service
Thanks
Your website is not accessible due to missing DNS entry. I check it using the mxtool
https://mxtoolbox.com/SuperTool.aspx?action=a%3asams-blog-api.azurewebsites.net&run=toolpage#
Please ensure that your url is correct.
The basic answer to this question was that I had not understood that you have to create a Database in azure for your deployed app to connect to, and you need to set the connection string as an env variable in azure so that it knows where to look, and you should also add code that automatically updates the database on launch.
This tutorial was what helped with that: https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-dotnetcore-sqldb
I then hit another issue where the deployed app was still returning a generic 500 server error. By enabling 'Diagnostic logs' via the azure portal, and downloading the logs, I saw this detailed error: The configuration section 'httpProtocol' cannot be read because it is missing a section declaration referring to a piece of config in my Web.config. I deleted it (I don't need it for now) and that fixed the issue

Flex app not hitting web service

I have zero knowledge on flex and need help to determine what is preventing my web service from being called.
We have a working application in production and the developer who wrote it has left.
I am trying to build it on my machine and I can see a web service call in fiddler being made with the URL "/Services.asmx/MethodName" (as a GET request).
I have set my break point in the asmx web service and it is not being hit. All I get in the flex front end is a pop up with " The remote server failed to respond and may be offline. http://MachineName/Services.asmx/MethodName"
The web service is in the same application as the web app that hosts the SWF file.
I have the cross domain policy file in place.
What I noticed in fiddler is the URL is "/Services.asmx/MethodName" and not "/WebApp/Services.asmx/MethodName" (not sure if this makes a difference) where WebApp is the IIS virtual directory to the web application that hosts the SWF.
Any ideas?
JD
If you are Web-services and your web-application is same domain then just pass the whole path like "http://..../Services.asmx" for creating web-service api instance in ActionScript 3.0 (for flex). and use this instance name to call your web-service method.
Please read this article from Adobe help for your perfect answer

Accessing User Application from Web Application

I have a dll i created that gets the excel object on users computer(if excel is installed) and has a handful of availalbe functions. I made a reverence to the dll in a Web Application. When I test this using the local host it works. If I deploy this on a Web Server will it still work or will it try to find the excel application on the server?
Without seeing your code I can only offer a guess, and my guess is that it will search the server and not the users computer.
You can probably use ActiveX to call Excel from the users computer, but that would only work in IE. I'm not sure who your audience is, but I needed similar functionality for the company I used to work for. For that I made a program that was installed to all users computers and then we used a custom http protocol that would open up programs on the client machine through a hyperlink. Doing it this way is cross browser compatible.

Resources