VB Windows service that maps a drive then uses it - vb.net

Map a network drive to be used by a service
My question is relatively similar, and I realize there are others that are.. but I can't get it to work. I am creating the service thru visual studio 2010.
I attempted to map using WNetAddConnection2- and it successfully maps and is instantly lost (check if drive is mapped right after mapping it).
So I tried something else..
I saw some information about using WSH.. I added the reference and tried using wsh... didn't work.
I tried WNetUseConnection and that failed as well.
Attempted running the service under a different profile- that didn't work
Once I actually get access to the network drive, i need to copy files from that share into a local directory.
Maybe I'm missing the boat here but If someone could give me a thorough explaination of what is actually going on and a direction to head I can probably figure it out

Use the System.Security.Principal.WindowsIdentity class' Impersonate Method with the credentials of a user that has access to that drive and then try to grab the files.

Related

How can I use M/S Graph APIs to read Sharepoint lists

I see from other Users' questions that this used not to be possible but other research suggests it now might be; I'm using Graph Explorer and have started with this generic URL: https://graph.microsoft.com/v1.0/sites/{siteId}/lists/{listId}/. I'm logged in as a User who is an Owner of the Sharepoint site I'm going after. But so far, I have not been able to find, much less see the contents of any Lists that I know are there in the site. Q1: Is this even possible (now)? Q2: How - or - what am I missing?
Yes this is possible but the graph API doesn't rely on the permissions as defined on SharePoint and might explain why you are not seeing the lists you own via the graph api.
You will have to setup the necessary Azure AD permissions on your app to access SharePoint list and items via the graph api.
As shown below, i can read data from the specified list based on permissions already consented to.

Migration from Google Drive API v2 to v3

Recently I've taken the time to migrate a VB.NET project that used google drive apis v2 to the v3 instead. I got the basic things to work but there are some details about storage usage and some other simple safety validations that I did that now don't work. It's quite silly actually, but I don't know how to get this to work, here's the thing:
In v2 I used this line - service.About.Get().Execute.User.EmailAddress - to get the email address that the token was created with, and then compared it to the one that the user was actually trying to upload files to, and see if they matched.
The problem is that I can't make that line work anymore, I've read in another question here in SO Google Drive API v3 Migration that this:
service.about().get().setFields("user, storageQuota").execute()
should be the new way of doing this kind of thing, but visual studio says there's not such method like "setFields" there.
Does anyone know what am I doing wrong or what is the correct way of doing this in VB.NET? Thanks.

VB.NET Safe to have ftp details inside .exe?

I'm making a uploading program, though its just come to my thought of .exe .net decompliers. I want to know is it safe to put my FTP details in my program?
Depending on how you use the program. If it is only for you, then this should be OK, but I won't recommend doing it if you distribute the app somewhere.
Simplest way to see the strings in the program is using strings command on Linux or its equivalent on Windows - described here. This will show you the strings that are present in the file, and may be even simpler than obfuscating the code.
If you are going to distribute the app, I would suggest either:
Adding some configuring section, where the user himself enters the credentials, or
Permission the FTP to anonymous login correctly and let the users log in with anonymous login. It will have the same security strenght as adding the password to the file. This may be useful for just downloading the data, but won't really work for uploads, as anyone would be able to fill your FTP with any data. For that, you'll have to use the first way.

Xcode - Web services and my confusion

I am having a problem here. I am totally new to this concept of servers and web services and being able to get data uploaded and retrieved on different devices, but I want to learn it, say if I want to create an app like Instagram.
But that is EXACTLY what I dont want, a link to a long tutorial on the internet on how to create the most complex app ever, I want to start slow. After doing extensive power searches on Amazon there are basically no books that will help me. So I want to start slow, here is my goal:
Get a great understanding of how web service backends and servers work and be able to apply it in other app ideas I have and want to start developing
I would like to start by being able to create an app that allows a user to enter some text into a field, it uploads to the server, another device can press a button to retrieve the text and display it in a text view.
I do not know php, and every single tutorial I have entered on this website is literal mindeff, the reason for this is because everyone has a different solution, sync web service backend with Core Data, MySQL, parse, Rails and it truly overwhelms me because I do not know which one to pick! And even worse some people provide code but I have no understanding whatsoever, and its like looking at a totally new language!
I am not asking for code, in fact that is the exact opposite. I am asking for someone to really lay out their knowledge, how does it all work? What is the best tool? Some resources and links. Nothing too complex...
I hope you can truly understand my extreme confusion and frustration. I think the reason might be is I might not be ready yet for all this, but I want to push forward and carry out my app idea!
Thank you...
Update:
I have finally decided on a web service I would like to use, it is the Amazon S3 web service, I am still not fully comprehending the full process though, any help or ideas!?
Since you wanted to create an Instagram-type app, look at this: http://www.raywenderlich.com/13511/how-to-create-an-app-like-instagram-with-a-web-service-backend-part-12
This is a good link to servers: http://www.youtube.com/playlist?list=PLC71D7CFB6AF935E6&feature=plcp. Watch the list to get an understanding of servers.
Maybe you want to read up on sql. Understanding sql will help.. Again: http://www.youtube.com/course?list=EC32BC9C878BA72085&feature=plcp. Watch the list to get an understanding of sql...
I can pass you the link and you got to do the work....
Hope this helps...

No Google Drive API writersCanInvite equivalent?

With Docs API deprecated and some nice new functionality in Drive API, I'm working on updating some of my file migration scripts. However, I've found there doesn't seem to be a Drive API equivalent to the writersCanInvite parameter in Docs API v3. Being able to set this attribute on a file would be extremely important during migration scenarios as without it, the migrated file would be left open to having editors share it out further.
Not having writersCanInvite avaialble in addition to not being able to see email addresses (or some Unique ID) for the ACLs is preventing me from fully porting over my migration script to Drive API v2.
Thanks Guys,
Jay
It looks like we now have a writersCanShare attribute that controls this:
https://developers.google.com/drive/v2/reference/files#resource
at the moment, it's not marked as writeable but I had no problems making it False for a new document so I'm guessing that's just a documenation issue.