我在sharepoint服务器上运行代码,这令我头疼 . 问题在于Filstream.create会抛出此异常

System.IO上的异常.__ . Error.WinIOError(Int32 errorCode,String maybeFullPath)在System.IO.FileStream.Init(字符串路径,FileMode模式,FileAccess访问,Int32权限,布尔useRights,FileShare共享,Int32 bufferSize,FileOptions选项,SECURITY_ATTRIBUTES secAttrs,String msgPath,Boolean bFromProxy,Boolean useLongPath,Boolean checkHost)at System.IO.FileStream..ctor(String path,FileMode mode,FileAccess access,FileShare share,Int32 bufferSize,FileOptions options,String msgPath,Boolean bFromProxy)at System .IO.FileStream..ctor(String path,FileMode mode)at

抛出异常的代码块是

using (FileStream fs = new FileStream(TargetPath, FileMode.Create))
                {


                    BinaryReader bReader = new BinaryReader(readStream);
                    BinaryWriter bWriter = new BinaryWriter(fs);
                    int allBytes = (int)readStream.Length;
                    bWriter.Write(bReader.ReadBytes(allBytes));
                    //bReader.Close();
                    //bWriter.Close();
                }

有没有人有一个想法,关于如何去做?