c#


Owin SelfHost VirtualPathRoot null issue in Asp.Net WebApi 2 Odata


I'm building an Asp.Net WebApi 2.2 Owin SelfHosted application with Odata V4.
I have registered ODataBatchHandler as in below code to handle Odata batch request.
public void Configuration(IAppBuilder app)
{
...
HttpConfiguration config = new HttpConfiguration()
ODataBatchHandler batchHandler = new DefaultODataBatchHandler(GlobalConfiguration.DefaultServer);
...
config.EnsureInitialized();
}
Problem
When receiving a batch request an exception is raised.
Value cannot be null. Parameter name: virtualPathRoot ExceptionType :
System.ArgumentNullException
I have debugged and found that GlobalConfiguration.DefaultServer.Configuration.VirtualPathRoot is null in Self Hosted App but VirtualPathRoot has a value = "/".
Can anyone help me to solve this issue?

Related Links

List of different types based on the same interface C# problem
Help with new override for Except extension method
Icons in rich text box?
Data binding a string variable of static class to textBlock in Phone 7?
How to bind a checkedlistbox from a property of an object within a list<object>?
Where and when to use “this” keyword [duplicate]
convert c# datatype to equivalent java datatype
comments and Facebook C# SDK
GridView Sorting works once only
Why is CS0246 “The type or namespace name 'Name' could not be found” C# error so confusing?
Is that a good usage of the decorator pattern?
Pagination in RDLC reports in c#
StreamReader and seeking
first letter of text box
error in mysql syntax?
Entity Framework 4 - How to Update an Object

Categories

HOME
google-cloud-pubsub
teradata
aix
xamarin.forms
arguments
swap
activejdbc
desktop-application
mbed
jinja2
appsettings
multibinding
vivado-hls
wallet
restructuredtext
devexpress-mvc
inspec
continuous-fourier
visual-studio-community
ballerinalang
android-6.0-marshmallow
formtastic
angular2-changedetection
git-submodules
azure-table-storage
ds-5
visual-prolog
dropdownbox
aweber
kofax
oracle-bpm-suite
jquery-inputmask
sknode
glide-image-library
django-cors-headers
spring-cloud-bus
playframework-2.3
intermediate-language
sp
totalview
petapoco
disassembly
apache-commons-cli
symantec
dimensionality-reduction
git-push
require-handlebars
cherry-pick
system-integration
radar-chart
sqlxml
code-translation
containstable
oryx
recode
serial-communication
taverna
tokudb
photogrammetry
beagleboard
teamstudio-unplugged
shunting-yard
fxmlloader
vundle
powerpoint-2010
pnunit
pytz
ios-enterprise
time-frequency
serializer
visual-studio-setup-proje
autofilter
jfilechooser
ardor3d
wpd
nx
generator-expression
django-tinymce
configurationsection
mail-gem
netbiscuits
custom-cursor
flatten
wxperl
ruby-1.9
discussion-board
digg
google-local-search
jquery-attributes
qprocess
datadude
html-help-workshop
jettison
asp.net-1.1
memory-consumption

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile