asp.net mvc - Websecurity.CreateUserAndAccount on Azure doesn't work -


i have method registers new user using websecurity.createuserandaccount(model.username, model.password) problem in userprofile model have added guid key. on local machine populates empty guid when call method. on azure however, following error:

   system.data.sqlclient.sqlexception (0x80131904): cannot insert value null column 'key', table 'scheduler.dbo.userprofile'; column not allow nulls. insert fails. 

now, i've tried generate new guid in constructor of model, manually have set{} generate new guid , same error.

when try use createuserandaccount overload like:

 websecurity.createuserandaccount(model.username, model.password, new { key = guid.newguid() }); 

i following syntax error (run time):

 incorrect syntax near keyword 'key'. 

i've spent part of morning trying figure out , can't. way of above methods still result in empty guid 00000000-0000-0000-0000-000000000000 , overload gives me syntax error on local machine.

"key" reserved word in sql, should used in brackets [key]

since don't have control on how websecurity generate sql query option rename userkey


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -