[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x

REST

184

Solutions

378

Contributors

Representational state transfer (REST) is an architectural style that gives a coordinated set of constraints to the design of components in a distributed hypermedia system used to design networked applications. RESTful systems typically communicate over Hypertext Transfer Protocol (HTTP) with the same HTTP verbs (GET, POST, PUT, DELETE, etc.) that web browsers use to retrieve web pages and to send data to remote servers. REST interfaces with external systems using resources identified by Uniform Resource Identifier (URI) that can be operated upon using standard verbs.

Share tech news, updates, or what's on your mind.

Sign up to Post

Dear All

I am using WebClient.DownloadFile() to download  a text(*.txt) file from server. It was working fine in all systems since years but suddenly in two systems it started giving issues though in rest of the systems its working fine.
Issue is its downloading an empty file from server and getting hang.

Please suggest what could be the reason. Below is the line of code I am using to download the file.

                           using (WebClient wc = new WebClient())
                            {
                                try
                                {
                                    wc.Credentials = System.Net.CredentialCache.DefaultCredentials;
                                    wc.Proxy = null;
                                    wc.DownloadFile(ServerURL + ServerFileName, CurrentDir + ServerFileName);
                                    wc.Dispose();
                                    
                                }
                                catch (Exception ex)
                                {
                                    MessageBox.Show(ServerURL + ServerFileName+Environment.NewLine+ex.ToString());
                                }
                           }

Open in new window


Thanks in advance.
0
On Demand Webinar: Networking for the Cloud Era
LVL 10
On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

I'm extremely new to programming. I've been tinkering with it on and off for decades but have never written an actual program. That changed yesterday.

Now, I've hit a brick wall.

I do not understand the fundamentals, but I get how code works for the most part.

My question is I have code that looks like this:

Private Sub Crystl32Button_Click(ByVal sender As System.Object, e As EventArgs) Handles Crystl32Button.Click
        For Each P As Process In System.Diagnostics.Process.GetProcessesByName("InHouseApp")
            P.Kill()
            P.WaitForExit()
        Next
        My.Computer.FileSystem.CopyFile("\\remoteserver\software\iha\ocx\crystl32\*.*", "C:\Windows\System32\",
        Microsoft.VisualBasic.FileIO.UIOption.AllDialogs, Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
    End Sub

Open in new window


I want to add the functionality of this:

Sub RemoveFileSecurity(ByVal fileName As String, ByVal account As String, _
        ByVal rights As FileSystemRights, ByVal controlType As AccessControlType)

        ' Get a FileSecurity object that represents the 
        ' current security settings.
        Dim fSecurity As FileSecurity = File.GetAccessControl(fileName)

        ' Remove the FileSystemAccessRule from the security settings. 
        fSecurity.RemoveAccessRule(New FileSystemAccessRule(account, _
            rights, controlType))

        ' Set the new access settings.
        File.SetAccessControl(fileName, fSecurity)

    End Sub

Open in new window


This code is supposed to remove the ACL listing of a specific account for a file.

However, I do not know how to add this:

Sub RemoveFileSecurity(ByVal fileName As String, ByVal account As String, _
        ByVal rights As FileSystemRights, ByVal controlType As AccessControlType)

Open in new window


To my button click sub. Whenever I try, it auto-completes and removes the "Sub" I type in. I assume you can't have a Sub within a Sub but what do I modify in order to get the rest of the ACL code to work with the button click? Do I have to modify the button click Sub in order to match the ACL one?

I apologize if I'm not making sense. Again, this is my first real program and I'm not exactly up to par on all the methodologies.
0
ATTENTION APC UPS USERS! (could apply to other UPS batteries!)

I thought it was only responsible of me to follow up on this question after REAL EXPERIENCE which could have been FATAL!

This question is right on topic with a recent event this week, where I've spent the night in hospital!.

Red Light on Smart UPS 2200

After suffering the effects of Respiratory irritation caused by inhaling toxic gases in the datacentre.

One or Two APC 3000 UPS failed in the datacentre, with battery faults, the gas possible Hydrogen Sulphide (H2S) filled the closed datacentre with possibly Hydrogen Sulphide (H2S).

I only open the door, and walked in for exposure for what could have been more than 10 seconds, it was enough to overwhelm me causing headache for the rest of the afternoon, nausea, coughing and later breathlessness after advice from "NHS 111 Online" I went to Accident and Emergency, where they wired me up to ECG, Heart Rate, Blood Pressure monitors, took blood samples every hour for testing, and oxygen and nebuliser.

I was discharged after 12 hours, being advised to rest, take it easy and the exposure and irritation should get better over 48 hours.

I'm still feeling tired, cough is getting better, but still my chest still feels very heavy which I'm told is the inflammation of the lungs,

My recommendation should you have a battery light is to isolate from the Power Supply Immediately.
3
 
LVL 98

Expert Comment

by:John Hurst
Andy - I offer you my very best wishes and I hope you have a complete recovery. Sounds nasty.  ... John
0
 
LVL 123

Author Comment

by:Andrew Hancock (VMware vExpert / EE MVE^2)
Thanks John
0
I need to write a piece of JavaScript which will make a REST call to update a field within a document library InfoPath (XML) document.

Any help on this would be greatly appreciated.
0
I am hitting a wall here and exhausted my researching skills. Looking to the experts here.
In summary, my developer at work created a REST API for me to call via Access/VBA. Below is some sample code I have created to use this API. This API is to call an import utility to import the data I am passing in the request.

I know my authentication is good as well as the URL. I am getting a http status of 200 and a expected JSON response. Also in the API I am passing the ImportSpecification ID that has to exist in the source system. If I change that value to "XYZ" I get an error saying the Import Specification doesn't exist. So that validates the URL in my opinion.

Based on the JSON response, it doesn't appear the body (response) of my message is getting received. Below is my code for reference. I have taken out the necessary sensitive info. What am I missing here?!?!

Dim sURL As String, Request As String
Dim xmlhtp As XMLHTTP60
Set xmlhtp = New XMLHTTP60

Request = "<ImportData xmlns=""urn:Import.DataUtility"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"">"
Request = Request & "<Data xsi:nil=""false"">"
Request = Request & "<string xsi:nil=""false"" xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays"">##INI=EMP</string>"
Request = Request & "<string xsi:nil=""false"" xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays"">1,DATLATEST</string>"
Request = Request & "<string xsi:nil=""false"" …
0
Hello,
I have written a mock for a REST service using SoapUI free version. The resource path looks like <webservice>/employees which returns all employees in JSON. Now I want to pass a parameter which is a date range, something like <webservice>/employees?from=01-01-2017&to=31-12-2017
This will return only a few employees who joined during the date range. I am not able to find a way to accept parameters in the mock response and not sure how do i check something like if(date == 01-01-2017 to 01-04-2017) { //pass this json text   } else if(date == 08/08/2017 to 31/12/2017) { pass this text }

Any help would be greatly appreciated as I am new to SoapUI
0
Hi there!

I have a development written in .NET/C# standard (not .NET Core) that connects to a Rest API for fetching records of my customer's business. In other to login I have automated sending login form using NHtmlUnit, when I get an authorization token, I use RestSharp for fetching the data. The program runs well when I run on my development machine, however, when I deploy the the production environment (in this case, Azure), I get the following exception exception:

[10/04/2017 03:00:31 > 60fd26: INFO] An error occurred authenticating with Exact token info.

[10/04/2017 03:00:31 > 60fd26: INFO] The AddressFamily InterNetwork is not valid for the System.Net.IPEndPoint end point, use InterNetworkV6 instead.

[10/04/2017 03:00:31 > 60fd26: INFO] Parameter name: socketAddress

[10/04/2017 03:00:31 > 60fd26: INFO]    at java.net.AbstractPlainSocketImpl.doConnect(InetAddress , Int32 , Int32 )

[10/04/2017 03:00:31 > 60fd26: INFO]    at java.net.AbstractPlainSocketImpl.connectToAddress(InetAddress , Int32 , Int32 )

[10/04/2017 03:00:31 > 60fd26: INFO]    at java.net.AbstractPlainSocketImpl.connect(SocketAddress , Int32 )

[10/04/2017 03:00:31 > 60fd26: INFO]    at java.net.PlainSocketImpl.connect(SocketAddress , Int32 )

[10/04/2017 03:00:31 > 60fd26: INFO]    at java.net.SocksSocketImpl.connect(SocketAddress , Int32 )

[10/04/2017 03:00:31 > 60fd26: INFO]    at java.net.Socket.connect(SocketAddress endpoint, Int32 timeout)

[10/04/2017 03:00:31 > 60fd26: INFO]    at

Open in new window

0
0
I am currently hosting an API as an Azure App service. But I want to move it into my Virtual Machine and run it in IIS.
I already set it up as I would with any website but for some reason the page does not come up. Is there anything in specific I need to do to run the service?
0
Hi,

Someone (stupidly) installed virtual machines on our mail server, hence creating unwanted virtual addresses to that server - this meant every time a quarry for mail.ourdomain.com happned internally there would be a long wait time till clients would get the actual one that works - we've fixed this & removed the A records that were created because of this but one of the DCs which is also a DNS server refuses to remove these addresses and states "The record cannot be delete. Refused." - in that cullomn by the way under "Time stamp" for these records it says "Static".

What can we do? we've gone through all the rest of the servers & these records no longer appear there..

Thanks in advance!
1.JPG
2.JPG
0
Important Lessons on Recovering from Petya
LVL 10
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

So we're a Canadian company, and we had our Exchange 2010 on prem for a long time. An American company bought us out, and we ended up migrating our mailboxes to their newer Exchange 2016. However, we all notice the lag now, and although it's tolerable for some of us who are at major offices with Fiber internet connections, the rest of us are having a myriad of problems with the new setup, everything from inconsistent lag, to DNS and Autodiscover setup being less than ideal, to local Mailbox caches continuously break and forcing to recreate profiles in Outlook every time someone jumps on and off the VPN.

I wanted to explore the option of getting Exchange Online or some other service, and migrating those mailboxes to the Cloud, and having those users connect to the cloud-based mailbox. It makes even more sense to leverage cloud as the people who have these problems the most are mobile and are travelling across North America all the time.

Has anyone had experiences or a setup like this, and if so, can you give any feedback or advice on how to approach it?


Thanks
0
MS Access 2013 - I have a shared database with a form that maximizes on open.  It has an EXIT button with an event property of docmd.quit.  On my computer the EXIT button closes completely out of Access which is what I want; however for all other users, when they click the EXIT button, it only closes the form and leaves the rest of Access open.   I would appreciate any assistance please.
0
Hello,
facing a problem to choose best client side framework for localization with jsp?
I have REST API which i need to consume at client side and display it on jsp will it be safe to use spring mvc for client side?
What is the best practice to integrate client-server ?
0
Someone has suggested that I do a client side only rest api implementation using Angular or another MV* frontend framework. However, it is my understanding that client side only is not safe to have sensitive information flowing back and forth to API, like the API KEY.

Is there an external source known to someone here that could be used to fetching credentials and enforcing CORS - cross-origin resource sharing?

Any tips or best practices or advice on this ask would be appreciated.
0
I have been teaching a colleague how to create org charts on our own machines. When showing her how to rearrange subordinates,  each time she selects a subordinate pattern with the connectors on the left hand side 2 things happen:
1. the 1st subordinate does not arrange as the rest it's arrow is always bent and forms a different pattern into the manager
2. the distance from the connectors to the shapes is very large
However if she selects any patterns with the connectors on the right of the shapes she gets what I get, and what I expect, uniformity and a tighter space.
We are both using 2016. Please advise. This is her first introduction to Visio so her software is straight out of the box so to speak.
Any ideas gratefully accepted
0
Hello All,

 I am connecting Exchange 2016 server remotely via PS script to manage the Mailbox rules for users, we have close to 1500 users for which we have to create/modify mailbox rules however when i run the script (from non exchange server) which first import the exchange session to powershell and then execute the commands to manage mailbox rules but it fails after running properly for a few users with the message "Get-InboxRule/ New-InboxRule" is not is not recognized as the name of a cmdlet, function, script file, or operable program". i.e it is trying to execute the command before it imports the exchange cmdlet into powershell, please note when i run it for a few users only it will work properly.

i have also provided delay in the PS script just after import exchange session/cmdlets command but it didn't help.

sample PS script code:

$username = "xyz"

$password = get-content D:\password.txt | convertto-securestring

$cred = new-object System.Management.Automation.PSCredential -argumentlist $username, $password

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri url -Credential $cred

Import-PSSession $Session

Start-Sleep -s 10

Rest commands to Manage Mailbox

 Note- i am using the proper url in -ConnectionUri, here it is not accepting url to be included in body so i am replacing my url with simply a name "url" :)

 

I have to call the script one by one for each user, hence the one time connection to exchange …
0
This plugin appears on a site I created as needing updating. I don't recall ever adding it.  Does anyone know what it is for and should I update it?
0
Hi,
I am testing the deployment of BITLOCKER via GPO.
For the moment I want to just encrypt the fixed drives without using TPM
I have created a TEST OU and moved a single computer to it.
I have created a GPO and edited/activated the following
Computer Configuration>Administrative Templates>Windows Components>BITLOCKER encryption
I have activated the following
Control the use of BITLOCKER on fixed drives:ACTIVE
Configure the encryption on the hardware level on the fixed drives:ACTIVE
Select the recovery method for recovery of fixed drives using BITLOCKER: ACTIVE
The rest is not configured.
Please note that I have the GUI in french so the translation might not be exact.

I have applied the GPO to the TEST OU
run gpupdate /force on the only computed within the OU
Restarted the computer
The GPO does not seem to apply
manage-bde -status and the bitlocker mmc show the the bitlocker DISACTIVE

What am I doing wrong or what do i need to add?
Please help.
Lenovo ThinkPad with running Windows 10

Are there any compatibilty issues with OPAL drives?


GPO Bitlocker
0
I'm looking to consume an external Rest API Json data source into a SharePoint Online list column. I have the enterprise version with BCS.  Anyone had luck with this?
0
How to Use the Help Bell
LVL 10
How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

I am trying to do something similar to the app specs below.  I'm looking for a sample.  I thought I would use Asp.net Core MVC,  Ajax and SQL server.  I'm looking for a sample that can show me each step.

It's pretty simple.
1. My app has a form with 4 fields. (Vin, Make, Model, Year)
2. I input Vin in field 1 (Vin)
3. I GET from a third party Rest API JSON by passing the Vin to a URI string. The string will pass Vin I input and an API key
4. The API returns (Make, Model, Year)
5. I want to fill the additional form fields with (Make, Model, Year)
6. Finally, I want to save all fields (Vin, Make, Model, Year), to my Database.

I have been searching for an example similar.  I did find the Weather app example, but it's not complete.  It's just part of it.
Weather example: https://www.codeproject.com/Articles/1180283/How-to-Implement-OpenWeatherMap-API-in-ASP-NET-MVC
0
I want to build a web app that has a lookup field on my form to get data from a 3rd party Restful api.  It would make a url call to the service like : http://www.something.com/api/?id=12345. It passes 1 value.  That call would return 4 values.  Those values would populate my 4 form fields.  Upon save, I would save that data to my database. I planned to use c# and javascript and a MSQL or MySQL db.   I'm open though since it's from scratch.  I'm looking for maybe a HTML, Javascript, DB example or HTML, Javascript, DB, C# or PHP example.  Does anyone have an example of how to do that?
0
how may possible ways are there to authenticate REST API requests.
please provide few examples
0
windows 7 and 2008 R2 standard.
i'd like for users to have local profiles on their main computer they use 95% of the time. but then still be able to roam once in a while and use other computers. is that possible? thanks
0
I need a web service to remain secret and would use CloudFare or a similar technology to prevent DDoS attacks. Aside from DDoS, what other types of attacks are possible?

I assume my web service domain would be totally hidden, but need to be sure there is no other known threat to it.

Thanks
0
I love the notion that my REST web service could deliver a complete UI to the client, which that the client could then display complete functionality inside a window, on their own site. What's kind of client/server relationship is this?

Is this what Code-On-Demand does?

Does it return HTML/JavaScript/CSS?

What kind of control is needed on the client to receive this? An iframe?

What kind of problems might there be with this kind of interaction?
0

REST

184

Solutions

378

Contributors

Representational state transfer (REST) is an architectural style that gives a coordinated set of constraints to the design of components in a distributed hypermedia system used to design networked applications. RESTful systems typically communicate over Hypertext Transfer Protocol (HTTP) with the same HTTP verbs (GET, POST, PUT, DELETE, etc.) that web browsers use to retrieve web pages and to send data to remote servers. REST interfaces with external systems using resources identified by Uniform Resource Identifier (URI) that can be operated upon using standard verbs.