DynamoDS / DynamoRevit

Dynamo Libraries for Revit
https://dynamobim.org
338 stars 188 forks source link

Opening from or saving to a network location - "Method failed with unexpected error code 50." #1356

Open jsdbroughton opened 8 years ago

jsdbroughton commented 8 years ago

Dynamo version

1.2

Operating system

Windows 7 Pro

What did you do?

Attempt to open from or save to a mapped network location

What did you expect to see?

Successful open or save action

What did you see instead?

Method failed with unexpected error code 50.

   at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
   at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
   at System.Security.AccessControl.DirectorySecurity..ctor(String name, AccessControlSections includeSections)
   at DynamoUtilities.PathHelper.HasWritePermissionOnDir(String folderPath)
   at DynamoUtilities.PathHelper.IsReadOnlyPath(String filePath)
   at Dynamo.Controls.PathToFileNameConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o, String propName)
   at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
   at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args)
   at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
   at Microsoft.Practices.Prism.ViewModel.NotificationObject.RaisePropertyChanged(String propertyName)
   at Dynamo.ViewModels.WorkspaceViewModel.ModelPropertyChanged(Object sender, PropertyChangedEventArgs e)
   at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
   at Dynamo.Core.NotificationObject.RaisePropertyChanged(String propertyName)
   at Dynamo.Models.DynamoModel.<SaveBackupFiles>b__3b()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
kronz commented 8 years ago

Hi @stardotbmp , does your office have any particular firewall, restricted read/write rights, or other security measures for your network locations?

@riteshchandawar have you seen anything like this before?

Thanks Z

jsdbroughton commented 8 years ago

Nothing to write home about. It IS intermittent, though it requires a dynamo 'reboot' to clear the cascade of the issue applying to subsequent local saves also.

On Wednesday, 19 October 2016, Zach Kron notifications@github.com wrote:

Hi @stardotbmp https://github.com/stardotbmp , does your office have any particular firewall, restricted read/write rights, or other security measures for your network locations?

@riteshchandawar https://github.com/riteshchandawar have you seen anything like this before?

Thanks Z

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DynamoDS/DynamoRevit/issues/1356#issuecomment-254885956, or mute the thread https://github.com/notifications/unsubscribe-auth/AAubc15x31awt_0FCrIlpvC53Y_5gNaSks5q1lWpgaJpZM4KbLRt .

kronz commented 8 years ago

@stardotbmp hmm, intermittent you say? Some files work and some don't? Do the ones that don't work have a space in the name?

jsdbroughton commented 8 years ago

No spaces no.

It's the sort of intermittent that is about 90% of the time it errors out.

On Wednesday, 19 October 2016, Zach Kron notifications@github.com wrote:

@stardotbmp https://github.com/stardotbmp hmm, intermittent you say? Some files work and some don't? Do the ones that don't work have a space in the name?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DynamoDS/DynamoRevit/issues/1356#issuecomment-254929261, or mute the thread https://github.com/notifications/unsubscribe-auth/AAubc5tHfEZyxROaz-ZBuCLN7MJDP16Mks5q1nvsgaJpZM4KbLRt .

riteshchandawar commented 8 years ago

@kronz @stardotbmp , I will take a loot at it today.

BTW, do you have a full access to the Server which you are trying to Save or Open from?

QilongTang commented 7 years ago

Looks like an exception occurs while Dynamo checking if current user has written permission on the target location. It was added as ready-only workspace detection. Would you share more info about the specific setup of the network path, like permission wise. This would help us reproduce the bug.