Quantcast
Channel: Microsoft Community - Super Fresh
Viewing all 1237233 articles
Browse latest View live

createUploadSession for OneDrive for Business receives a 403 Forbidden error

$
0
0

I run the code below and I get a 403 Forbidden error when it gets to Dim rspe As Net.WebResponse = wr.GetResponseat the end.  It not only happens with trying to resume the upload session, but also when I try to just check the status of the session.  The code below needs a reference to System.Web.Extensions added to the project in order to run.  The other things that need to be changed have the word REDACTED in their places.  I've read a few other forums that suggest that this is just an issue with OneDrive for Business using App level tokens.  The session gets created successfully and a temp file is created in the destination on OneDrive.

Imports System.IO

Imports System.Web.Script.Serialization

 

ModuleModule1

    Private dtAccessTokenAsDateTime ="1/1/1900"

    Private strAccessTokenAsString =""

    Private strUserNameAsString ="REDACTED"

    Private strUploadFileAsString ="C:\Temp\test.pdf"

    Private strTokenURLAsString ="https://login.microsoftonline.com/REDACTED/oauth2/v2.0/token"

    Private strAppSecretAsString ="client_id=REDACTED&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default&client_secret=REDACTED&grant_type=client_credentials"

 

    Sub Main()

        GetAccessToken()

 

        Dim driveIDAsString = GetDriveID(strAccessToken, strUserName)

        Dim strURLAsString ="https://graph.microsoft.com/beta/drives/"& driveID &"/root:/test.pdf:/createUploadSession"

        Dim rspAsString =""

        Dim wcAsNew Net.WebClient()

 

        wc.Headers.Add("Authorization","Bearer "& strAccessToken)

        wc.Headers.Add("Content-Type","application/json")

 

        rsp = wc.UploadString(strURL, "POST","{""item"": {""@microsoft.graph.conflictBehavior"": ""rename""}}")

 

        Dim jssAsNewJavaScriptSerializer

        Dim objRspAsObject = jss.Deserialize(OfObject)(rsp)

        Dim strUploadUrlAsString =""

 

        If objRsp.TryGetValue("uploadUrl", strUploadUrl)Then

            Dim strmAsNew IO.FileStream(strUploadFile,FileMode.Open)

            Dim iChunkAsInteger = 3145728

            Dim iLenAsInteger = strm.Length

            Dim byt(iLen)AsByte

 

            strm.Read(byt, 0, strm.Length)

 

            Dim wrAs Net.HttpWebRequest = Net.WebRequest.Create(strUploadUrl)

 

            wr.ContentLength = iLen

            wr.Headers.Add("Content-Range","bytes 0-"& iLen - 1 &"/"& iLen)

            wr.Method = "PUT"

 

 

            Console.WriteLine("bytes 0-"& iLen - 1 &"/"& iLen)

 

            Dim rsAs IO.Stream = wr.GetRequestStream

            rs.Write(byt, 0, iLen)

 

            Dim rspeAs Net.WebResponse = wr.GetResponse

 

            rs.Close()

        EndIf

    EndSub

 

    PrivateSub GetAccessToken()

        Dim wcAsNew Net.WebClient()

 

        wc.Headers.Add("Content-Type","application/x-www-form-urlencoded")

 

        Dim strReturn = wc.UploadString(strTokenURL, strAppSecret)

        Dim jssAsNewJavaScriptSerializer

        Dim objRetAsObject = jss.Deserialize(OfObject)(strReturn)

 

        strAccessToken = objRet("access_token").Replace(vbCrLf,"").Replace(vbNewLine,"")

        dtAccessToken = Now()

    EndSub

 

    PrivateFunction GetDriveID(strTokenAsString, strUserAsString)AsString

        Dim strDriveIDAsString =""

 

        Try

            Dim wcAsNew Net.WebClient()

 

            wc.Headers.Add("Authorization","Bearer "& strToken)

 

            Dim strResponseAsString = wc.DownloadString("https://graph.microsoft.com/v1.0/users/"& strUser & "/drives")

            Dim jssAsNewJavaScriptSerializer

            Dim objContentsAsObject = jss.Deserialize(OfObject)(strResponse)

 

            ForEach obj AsDictionary(OfString, Object)In objContents("value")

                Dim strContentAsObject =Nothing

 

                If obj.TryGetValue("id", strContent)Then

                    strDriveID = obj.Item("id")

                EndIf

            Next

        Catch exAsException

 

        EndTry

 

        Return strDriveID

    EndFunction

 

EndModule


Overzetten harde schijf met microsoft account

$
0
0
Vandaag ging de PC gewoon niet meer aan. Aan/uit knop stuurde niets aan.  Misschien is het gewoon de voeding. Als het een hardware probleem is/wordt veranderen de specificaties.. Harde schijf laten overzetten in een eventuele nieuwe PC geeft problemen voor de configuratie bij mijn account. Ook zal inloggen op andere PC met huidig account niet lukken. Hoe kan ik dat alles oplossen 

Graphs not showing properly in print preview & printing

$
0
0

Hello,

I am having trouble with graphs not showing properly when in print preview (& printing).  When working on the sheet it looks fine but when I go to print preview (& print) only part of the graph shows and its not centered anymore.

Suggestions?  Thanks in advance.

Cortana

$
0
0

my windows 10 pro didnt come with cortana but a search please how can i get cortana?

I am from Nigeria

Windows 10 update

$
0
0
After the update yesterday I cannot load Facebook on Google Chrome...this is the browser I have always used forever.  Also, I did mange to get into Facebook through their troubleshooting site, somehow, and found that I cannot play any games.  It says I don't have Flash Player.  What the heck is going on?     

How to disable Windows Defender in Windows 10

$
0
0

Hello,

How can I permanently disable windows defender in windows 10 home?

Disk usage 100% -windows 10

$
0
0
Always my machine disk usage is in 98 -100% . Guide me resolve the problem. 

Groove Music crashes now

$
0
0
June 23/17 Today I noticed that Groove Music is crashing after anywhere between 3 secs and 10 seconds of opening and playing. The app just stops and closes. I have the latest update of Windows 10. I tried music on different drives including my external disk drive and on my included hard drive. I tried various songs. I have used Groove ever since I updated to Windows 10, sometime since last summer and has always worked fine. It may have been from a recent windows update, I'm not sure. I can't check the version of Groove, since it doesn't stay open long enough. I could try and uninstall and reload, if that would work, but I don't know how to uninstall it. Can anyone help me fix Groove? Thanks.

Netgear R6400 firmware upgrade and driver issue

$
0
0
Re: Netgear R 6400 Router. Received e mail from Netgear to upgrade firmware. However could not access router. Netgear said that because I did not upgrade firmware withing 6 months of purchase I had no security and I would gradually lose function. Wi Fi working and internet access working but Netgear phone guy said i would lose it unless I paid Netgear $150.00 for third party software. My computer tells me my drivers are up todate and Microsoft does not have any added drivers available for this router. Sounds like a scam and class action waiting to happen. Has anyone experienced this?

Windows 10 started crashing again

$
0
0

Hello,i had this problem before but thanks to ''auggy'' for checking my dump files found the problem, so i'm gonna put my dump files again can someone pls tell me what is the problem this time? Thanks!

dump files: https://drive.google.com/drive/folders/0B666wt5zqm7bLVpnSk9OMTJOMms?usp=sharing

graphics card not detecting (gtx 560 ti)

$
0
0

i am using gtx 560 ti graphics card ( asus) on my PC. it is used on intel motherboard with i3 processor. recently i have used another card (gtx 1060) on it, since then my PC is not detecting gtx 560ti card. i tried updating drivers from nvidia site but it failed with "hardware not found" error.

Please help...

Xbox one ремонт некомпетенция

$
0
0

Добрый вечер, сегодня столкнулся с такой проблемой . У меня xbox one, перестал загружаться, я как полагается , зашел в личный кабинет, зарегистрировал консоль, не гарантия. И начал через вкладку ремонт консоли и обслуживание, общаться в чате с оператором, т.к. Был уже вечер начало 18 , пятница в кол центр вкладку выбрать не удалось , ее просто не было. Выбрал общение в чате на английском языке))) начал общаться и объяснять свои беды, начал рассказывать последовательности действий , которые предпринимал, написал коды ошибок которые возникали. Итог один консоль не работает. Оператор мне предложил заплатить 160 рублей для отправки и замены консоли на рабочую ... заметьте рублей, на что я переспросил 10 раз , что еще будет входить в платеж, на что он ответил что только 160РУб, оказалось это не руб., а евро!!!непростительная ошибка для оператора я считаю, сделал возврат денежных средств, возврат отмечен в заказе , но денег нет на карте, скажите через какое время возврат поступает? Для такой компании microsoft работа такого неквалифицированного персонала не приемлема . Если у них нет разницы 160 рублей это или это сумма больше 10 тысяч рублей. Повторюсь спросил 10 раз.

I can't upload any of my files

$
0
0
After downloading the updates for Windows10 I can't upload anything from my pc. I get a window that states, "windows cannot find the "address". Make sure you typed the name correctly, and then try again. How do I fix this issue?

PCL XL error

$
0
0

I am using Windows 10 with a HP LaserJet 3320 printer copier scanner.  Unable to print content.  My printer prints as follows:

PCL XL error

subsystem: kernel

Error: unsopportedProtocol

Operator: 0x0

Position: 0

I think this is from an update but not sure.

Constant SYSTEM_SERVICE_EXCEPTION netio.sys BSOD

$
0
0

I have been having the BSOD listed above at least twice a day for the past week or two. 

Dump text:

==================================================
Dump File         : 052117-20937-01.dmp
Crash Time        : 5/21/2017 12:21:53 PM
Bug Check String  : SYSTEM_SERVICE_EXCEPTION
Bug Check Code    : 0x0000003b
Parameter 1       : 00000000`c0000005
Parameter 2       : fffff801`aa690918
Parameter 3       : ffff8c80`0fe8a1f0
Parameter 4       : 00000000`00000000
Caused By Driver  : NETIO.SYS
Caused By Address : NETIO.SYS+10918
File Description  : Network I/O Subsystem
Product Name      : Microsoft® Windows® Operating System
Company           : Microsoft Corporation
File Version      : 10.0.15063.0 (WinBuild.160101.0800)
Processor         : x64
Crash Address     : ntoskrnl.exe+16c310
Stack Address 1   : 
Stack Address 2   : 
Stack Address 3   : 
Computer Name     : 
Full Path         : C:\WINDOWS\Minidump\052117-20937-01.dmp
Processors Count  : 8
Major Version     : 15
Minor Version     : 15063
Dump File Size    : 927,828
Dump File Time    : 5/21/2017 12:23:06 PM


Пароль администратора

$
0
0
У меня была создана резервная копия ещё со старым паролем. Потом пароль был изменён. Была проблема, я восстанавливал систему из образа и виндовс запросил старый пароль. Я восстановил систему. Проверил, везде активен новый пароль. Я ещё раз создал резервную копию, причём заново, на другом диске, но система при очередном восстановлении опять запросила старый пароль. Систему я восстановил, но при загрузке компьютера система пытается использовать старый пароль, при этом говорит мне, что это не правильно и просит ввести другой пароль, предлагая мне в нижнем левом углу две мои учётные записи, которые отличаются названием "имя" и "имя + почта". Обе эти учётные записи откликаются только на новый пароль)))))) При попытке удалить одну из учётных записей, я нахожу только одну((((  Причём это происходит только при запуске системы, запрос пароля у меня отключен. При перезагрузке такой проблемы не возникает.

comment activer un programe venant d'un cd? (supraipcam)caméra de surveillance

$
0
0
comment entrer dans un programme entré avec un cd?'supraipcam caméra de surveillance

Microsoft Edge Issue

$
0
0

When opening Microsoft Edge it keeps going to "code-gu.tk/1799/win/e" and says my computer has been infected and to call a certain number.  My home page is supposed to open with google, but it does NOT let me do anything but to close out completely in the Task Manager.  What is this??

Don

windows media player and groove music

$
0
0

I like windows media player much better than groove music. It's features can not be matched by groove. Please leave windows media player alone and leave it to the people what music default app they want. I made windows media player my default music player. Please keep this great music application in windows ten and in all the future advancements there may be. 

Sincerely,

Louie

Printing out a macro

$
0
0
Please note: I am not asking about macros that produce print jobs! (I get shoals of references to that when searching). What I need to do is to print out the actual macro itself (the print option is greyed out). I have tried copying and pasting into another iteration of Word and that does not work either. I want an actual printout of the macro itself.
Viewing all 1237233 articles
Browse latest View live


Latest Images