How do I access these xml files from some other machine? - olap

I need to access the cubes through olap4j API in java application. XML cubes files will be available in some other IP server. For Example, XML files will be in 192.168.1.1 IP and C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\geomondrian\WEB-INF\queries path. How do I access these xml files from some other machine.
Class.forName("mondrian.olap4j.MondrianOlap4jDriver");
// Create connection.
connection =
DriverManager.getConnection("jdbc:mondrian:Jdbc=jdbc:postgresql://192.168.1.33:5433/simple_geofoodmart?user=postgres&password=postgres;**Catalog=E:/xml/simple_foodMart.xml**;JdbcDrivers=org.postgresql.Driver;");
OlapConnection olapConnection =
((OlapWrapper) connection).unwrap(OlapConnection.class);
I am not able to access the catalog which is available in other IP. find the below my catalog URL path. How can i access?
Catalog=//192.168.1.10/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%207.0/webapps/geomondrian/WEB-INF/queries/simple_foodMart.xml

Mondrian uses Apache VFS to fetch the catalog from the provided URL. You have a lot of options. The catalog could be on the local file system, or it could even be on an HTTP server, in which case you pass the web URL of your catalog directly.
It also supports much more complex scenarios. Apache VFS allows you to define any type of file handler you need. You could, for example, create a handler which responds to requests in the "bacon://" protocol and generate the catalog dynamically.

Related

Is there a way we can conncet mulesoft and unix to retrive files from unix server and send via email

Can someone provide some guidance on ho we can connect mulesoft and a unix server to retrieve files from unix server and send the file or share the location of the file via mulesoft.
Thanks,
MulesSoft Is a company. I'll assume that you mean to use MuleSoft's Mule runtime and create a Mule application to implement the integration described. First determine what protocols the Unix server allows to access files. Usually it would be SFTP but it could be the insecure FTP or even HTTP. Assuming HTTP, you can use the SFTP connector listener to poll periodically for files to appear. Then use the Email connector to send the body of the file read in the previous step as an attachment.
Alternatively you could use the list files operation to read the files names and use that information to just send the locations in the email.
You can find more information about the operations in the documentation.
Documentation:
https://docs.mulesoft.com/sftp-connector/1.4/
https://docs.mulesoft.com/email-connector/1.4/

Publish asp.net web api to azure, database connection not working

After publishing the web api to azure in Visual Studio, and adding two sql databases in the wizard the account database connected itself without problems to the app service in azure. The data containing database, however, did not. How do I tell the app service web api to use that database?
Depending on how your solution was created, you will have a "web.config" and/or an "app.config" file.
Open these up and check the "connectionStrings" section. You should have an entry for each database connection. Verify that these are pointing to the proper databases with the proper security.
In Web.config, the "connectionStrings" section is in the section "configuration".
In "App.config the connectionStrings section is in the same place.
You will have to allow certain IP addresses to connect to it. Look at the SQL Database server's Firewall setting. You can the IP address of your computer (or IP range), to access SQL Database
Make sure to enable Allow Azure services and resources to access the server

How do I restrict access to a website hosted on an Azure VM to a given IP and itself?

I am doing some testing on an Azure VM and have an ASP.NET website that I wish to limit access to. The website should only be accessible from a given IP (our office) but I also want the server to be able to make requests to other websites hosted on itself.
I have successfully setup an IP and Domain Restriction for our office IP but cannot find a way to allow requests internally from itself.
Is this possible without setting up a static IP in Azure?
This question should be migrated to ServerFault, but given that there are programmatic approaches to it, I'll answer:
You need to set up Access Control Lists on the input endpoints, to specify ranges (via CIDR notation) of allowable or blocked IP addresses.
While this may be done via the portal, you may do it via the CLI:
azure vm endpoint acl-rule create [vm-name] [endpoint-name] [order] [action] [remote-subnet]
You may do this via PowerShell as well. Rough outline:
Use New-AzureAclConfig to set up a config object
Use Set-AzureAclConfig to add rules to the config
Use Get-AzureVM to retrieve the config of your given virtual machine and add the ACL config to the VM
Use Update-AzureVM to save your changes
More PowerShell details here.

AX 2012 http inbound port activate error – deployment web site was not found for port

I am new to AX and a beginner to IIS (and first post on stackoverflow). I need some assistance with AX 2012 AIF Web Services and configuring an http AX Inbound Port.
My issue is in trying to activate an Inbound Port within AX using HTTP. I receive the following two errors:
The deployment web site was not found for port: TestOrdImport
The port ‘TestOrdImport’ could not be deployed.\nError: The deployment web site was not found for port: TestOrdImport
This is in a test environment using the Microsoft issued AX 2012 FP1 hyper-v image. Someone else installed the web services using the instructions found here: https://msdn.microsoft.com/EN-US/library/gg731848.aspx
Based on the person who did the install for the web services I created a new entry in the web sites screen using a virtual directory share path of “C:\Program Files\Microsoft Dynamics AX\60\AifWebServices\” and URL "http://AX2012-A:85/MicrosoftDynamicsAXAif60"
I am not sure if these are correct the but the web site validates without error. The web services appeared to be installed into site “AIF” rather than the “Default Web Site”
Does anyone see any issues with the IIS configuration of sites? Should the web services been installed into the default web site rather than AIF site?
When creating the Inbound port it needs to be http as I am setting this up per someone’s request but again I cannot get the inbound port to activate and could use some guidance.
https://i.imgur.com/cl8jGVJ.png
I was able to get someone with AX experience to resolve the issue using the HTTP inbound port adapter with AX and the AIF Web Services.
Some key points related to my issue and setting up the inbound port in AIF with the configured AX AIF web sites that might be helpful to others in a similar situation:
Notes on setting up the AIF web sites within AX:
To get the correct folder (virtual directory) for the actual IIS
server setup, you must use IIS to find the association (Virtual
server -> physical disk path).
The URL must be a valid reference to a real HTTP server that will be servicing this service (port 85 in my case; not port 8101). The AOS hosted WCF services is configured for port 8101.
Notes on setting up the HTTP Inbound Port within AX:
The site path in the URI for the Inbound port did not match any path
defined in the “Web sites” configured. The text string must exactly
match from the “http://...” beginning through to the inbound port
name (“TestOrdImport/xppservice.svc” portion), using port 85 in my
example and no “/Services/” in the path since that was for the basic
inbound ports and “Services” sub-folder is not configured for the IIS
virtual server. In fact, if you attempt to setup the web site
configuration with the “Services” sub-folder so that it matches
correctly there, the web sites form will give you an errors since
“Services” sub-folder does not exist and if you create it, it does
not have all the other support files that were installed (the “bin”
folder and such).
When deployed successfully and when I use the WSDL URI in the web
browser, I get back a page stating “You have created a service….” And
tell you some basics on how to use it (this shows it is installed
correctly). For HTTP services you always add “?wsdl” to the URI to
get the actual WSDL document so this URI/URL works correctly for
that: http://ax2012-a.contoso.com:85/MicrosoftDynamicsAXAif60/TestOrdImport/xppservice.svc?wsdl
It is not much but I hope this helps someone else. Much of the above was written by the person who helped solve my issue.
This may also be caused by a trailing slash character (/) in the website URL field.
Removing it may resolve this error message.
Source: https://community.dynamics.com/ax/b/axdilip/archive/2015/06/23/troubleshoot-dynamics-ax-2012-aif-error-the-deployment-web-site-was-not-found-for-the-port

Sending files from server to client with ASP.NET

I am developing a C# ASP.NET 4.0 application that will reside on a Windows Server 2003. By mean of accessing this application through a network computer, any user would be able to upload files to the windows server. But also, once these files are stored on server, he/she would be able to copy these files from the windows server to another networked computer.
I have found a way to upload files to a specified location on the server disk,
but now I need to send these files that are on server disk to the client computers.
My question is: Is there any way to send or copy files from server to other client computers (not the one that is accessing the web service) without needing a program recieving those files on the client computers? FTP, WCF, cmd commands, sockets?
Any idea?
If you want users of your webapp to download files, I'd look into an "ashx generic handler." It will allow you to send files back down to clients over HTTP(s).
If you are looking to have remote users, tell your webserver to copy files to other servers ON THE SAME LAN AS THE SERVER, you would write using normal System.IO operations.
Over a LAN, if you have the correct permissions and so on, you can write to a disk on a different machine using File.Copy -- there's nothing special about that.
If we're talking about remote machines over the internet, that's a different story. Something has to be listening whether it's FTP, WCF, DropBox, etc.
If the problem is that it can be painful to get something like WCF to work from a client due to problems like firewall issues under Windows 7, you could take a different route and have the client periodically ping the server looking for new content. To give the server a point of reference, the ping could contain the name or creation date of the most recent file received. The server could reply with a list of new files, and then the client could make several WCF calls, one by one, to pull the content down. This pattern keeps all the client traffic outbound.
You can if you can run the program as an account that has access to that computer. However having this sort of access on your network that would grant access to the outside world to put an unfiltered file on your internal network is just asking to be hacked.
Finally, I decided to install a FileZilla FTP server on each client computer and my page is working very well. But another option is to create a work group in the windows server and put every client computer to work in this work group, so that Windows server have access to the computers in the same work group.
Here are some links that may help to create the work groups:
http://helpdeskgeek.com/networking/cannot-see-other-computers-on-network-in-my-network-places/
http://www.computing.net/answers/windows-2003/server-2003-workgroup-setup-/1004.html

Resources