Showing posts with label studio. Show all posts
Showing posts with label studio. Show all posts

Wednesday, March 28, 2012

Strange bugg with asp.net in Visual Studio

Hi,
I would appreciates some hints or help regarding a strange behaviour in
visual studio dotnet when using asp.net. I'm working with authentication
and somewhere in the process the framework goes nuts. Let me explain the
behaviour for you.
First you have a register page in the root of your project. Next you
have a folder named MemberPages and in this folder a login.aspx page.
And then you have welcome.aspx page.
You have a web.config and set restricion for anonymous users that
redirect to the login page.
If you compile and run the project you get the following error:
Could not load type 'GrundSys01.MemberPages.login'.
Ok and then you remove the login.aspx and rename the folder to MyPages
and then add a new login.aspx page and set it to start page.
Compile and run the project. Page displays fine.

Now why is that and what do I need to do?
I have tried to remove temporary files in framwork folder without
success.

I would appreciate if you could spend a little time to help me on this.

Regards
Andla

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Hi Andla,
It looks like a namespace problem.Check your project
properties and the inherits property of the page
directive on your login page.

Regards
-Narayana
>--Original Message--
>Hi,
>I would appreciates some hints or help regarding a
strange behaviour in
>visual studio dotnet when using asp.net. I'm working
with authentication
>and somewhere in the process the framework goes nuts.
Let me explain the
>behaviour for you.
>First you have a register page in the root of your
project. Next you
>have a folder named MemberPages and in this folder a
login.aspx page.
>And then you have welcome.aspx page.
>You have a web.config and set restricion for anonymous
users that
>redirect to the login page.
>If you compile and run the project you get the following
error:
>Could not load type 'GrundSys01.MemberPages.login'.
>Ok and then you remove the login.aspx and rename the
folder to MyPages
>and then add a new login.aspx page and set it to start
page.
>Compile and run the project. Page displays fine.
>Now why is that and what do I need to do?
>I have tried to remove temporary files in framwork
folder without
>success.
>I would appreciate if you could spend a little time to
help me on this.
>Regards
>Andla
>*** Sent via Developersdex http://www.developersdex.com
***
>Don't just participate in USENET...get rewarded for it!
>.
Thanks for your answer.
I have tested different namespace adjustment without any success. Also
I'm not sure how this can be a namespace problem because that it fails
only if the folder name is MemberPages. Any other name do fine. Also I
have made a search for 'MemberPages' string in the root because I
suspected that this laid hidden somewhere. Any file containing this
string was either changed or deleted and still the same problem appeared
again.
Maybe I should check the registry and remove any key containing this
string.
Don't really know what more I can do.

Regards
Andla

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Strange bugg with asp.net in Visual Studio

Hi Andla,
It looks like a namespace problem.Check your project
properties and the inherits property of the page
directive on your login page.
Regards
-Narayana
>--Original Message--
>Hi,
>I would appreciates some hints or help regarding a
strange behaviour in
>visual studio dotnet when using asp.net. I'm working
with authentication
>and somewhere in the process the framework goes nuts.
Let me explain the
>behaviour for you.
>First you have a register page in the root of your
project. Next you
>have a folder named MemberPages and in this folder a
login.aspx page.
>And then you have welcome.aspx page.
>You have a web.config and set restricion for anonymous
users that
>redirect to the login page.
>If you compile and run the project you get the following
error:
>Could not load type 'GrundSys01.MemberPages.login'.
>Ok and then you remove the login.aspx and rename the
folder to MyPages
>and then add a new login.aspx page and set it to start
page.
>Compile and run the project. Page displays fine.
>Now why is that and what do I need to do?
>I have tried to remove temporary files in framwork
folder without
>success.
>I would appreciate if you could spend a little time to
help me on this.
>Regards
>Andla
>*** Sent via Developersdex http://www.examnotes.net
***
>Don't just participate in USENET...get rewarded for it!
>.
>Thanks for your answer.
I have tested different namespace adjustment without any success. Also
I'm not sure how this can be a namespace problem because that it fails
only if the folder name is MemberPages. Any other name do fine. Also I
have made a search for 'MemberPages' string in the root because I
suspected that this laid hidden somewhere. Any file containing this
string was either changed or deleted and still the same problem appeared
again.
Maybe I should check the registry and remove any key containing this
string.
Don't really know what more I can do.
Regards
Andla
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!

Monday, March 26, 2012

Strange Date Problem

Hi all,

i am using visual studio 2005 and sql server 2005, i am developing a web application using visual basic 2005. i also let you know that i am in UK.

i am having a strange problem. i have got a form from whcih i need to insert the date values into the data base my querystring is as follows.

StrSql = "insert into tasks (TaskName,Sdate,PropEdate,InitID,TaskManager) values (" & _
"'" & Me.TxtTaskName.Text & "'," & _
"'" & Me.TxtSDate.Text & "'," & _
"'" & Me.TxtEdate.Text & "'," & _
Session("InitID") & "," & _
Me.DropDownList1.SelectedValue & _
")"

which is working fine except that it is storing date in different format that is mm/dd/yyyy.

on my other form i again want to insert the date value wich is not working.
my querystring is

StrSql = "insert into tasklog (taskid,currentstatus,updatedon,comments) values (" & _
Me.GridView1.SelectedValue & "," & _
Me.TxtRecentpos.Text & "," & _
"'" & Me.TxtDate.Text & "'," & _
"'" & Me.TxtComments.Text & "'" & _
")"

when i try to run this query it gives me the following error message:

The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value..

i have checked in the sqlserver and both the tables have got the smalldatetime datatype for my fields. it's really scaring for me that it is working on one place and not working on other.
any help would be highly appretiated.
thanksNo matter what the settings are in your code/computer/database, when putting date values into SQL statements, you cannot use the UK format (dd/mm/yyyy).

You must use either the US format (mm/dd/yyyy), or better a format which cannot be mis-interpreted (like yyyy/mm/dd).

If you format the values in this style, you will probably find that the code works perfectly.
Hi si,

i have tried both us format and the other format you told me. but sitll giving the same erroe message.

regards
Faizee
You must use either the US format (mm/dd/yyyy), or better a format which cannot be mis-interpreted (like yyyy/mm/dd).

If you format the values in this style, you will probably find that the code works perfectly.[/QUOTE]

Hi Si sorry i have tried (mm-dd-yyyy) and (yyyy-mm-dd) both are working fine. is it not possible that user enter the date in UK format ( i am using vb 2005) and then i format this to us format or other format to save in the SQL Server so that the users are not confused?

regards
Of course... you just have to convert it before using it in an SQL string.

I haven't used .Net enough to suggest the code you would use to convert it, but can recommend that you use a special date control rather than a textbox - as this is always clear to the user, and to your code too (no matter what settings the PC has).
The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value..

This can be caused by trying to put a date less than 1/1/1900 or larger than 6/6/2079

Also check out using parameters with your SQL strings, it prevents sql injection as well has handles special characters.
Thanks Si and Bill,

i am using RJS Calendar control now and it's working fine.

thanks a lot for your help

Faizee

Strange Error

Hi Experts,
I have Visual Studio 2003 Installed in my Windows 2003 Sever. However, I
have problems in creating new Projects, Classes, Forms etc. When I try to
create New projects, I get an error that some wizard is missing and I get
an empty project opened. There are no forms, web.config, global.asax nor any
references set. I need to add all manually.
I am still getting the error, when I try to add new forms/ classes/User
controls to any of the projects.
The following error I got when I tried to add a new class file.
Could not run the 'C:\Program Files\Microsoft Visual Studio .NET 2003
VC#\CSharpProjectItems\WebProjectItems\..\CSharpAddClassWiz.vsz' wizard.
Can anyone tell me how to solve this problem.
Thanking in advance
Regards
GaneshHello Ganesh,
Try this:
regsvr32.exe "c:\program files\Microsoft Visual Studio .NET 2003\Vc7\vcpacka
ges\csproj.dll"
Matt Berther
http://www.mattberther.com

> Hi Experts,
> I have Visual Studio 2003 Installed in my Windows 2003 Sever. However,
> I have problems in creating new Projects, Classes, Forms etc. When I
> try to create New projects, I get an error that some wizard is
> missing and I get an empty project opened. There are no forms,
> web.config, global.asax nor any references set. I need to add all
> manually.
> I am still getting the error, when I try to add new forms/
> classes/User controls to any of the projects.
> The following error I got when I tried to add a new class file.
> Could not run the 'C:\Program Files\Microsoft Visual Studio .NET 2003
> VC#\CSharpProjectItems\WebProjectItems\..\CSharpAddClassWiz.vsz'
> wizard.
> Can anyone tell me how to solve this problem.
> Thanking in advance
> Regards
> Ganesh
Thanx Matt for your reply. It was really helpful.
Regards
Ganesh
"Matt Berther" <mberther@.hotmail.com> wrote in message
news:6846946632388960337567249@.news.microsoft.com...
> Hello Ganesh,
> Try this:
> regsvr32.exe "c:\program files\Microsoft Visual Studio .NET
2003\Vc7\vcpackages\csproj.dll"
> --
> Matt Berther
> http://www.mattberther.com
>
>

Strange Error

Hi Experts,

I have Visual Studio 2003 Installed in my Windows 2003 Sever. However, I
have problems in creating new Projects, Classes, Forms etc. When I try to
create New projects, I get an error that some wizard is missing and I get
an empty project opened. There are no forms, web.config, global.asax nor any
references set. I need to add all manually.

I am still getting the error, when I try to add new forms/ classes/User
controls to any of the projects.

The following error I got when I tried to add a new class file.

Could not run the 'C:\Program Files\Microsoft Visual Studio .NET 2003
VC#\CSharpProjectItems\WebProjectItems\..\CSharpAd dClassWiz.vsz' wizard.

Can anyone tell me how to solve this problem.

Thanking in advance
Regards
GaneshHello Ganesh,

Try this:

regsvr32.exe "c:\program files\Microsoft Visual Studio .NET 2003\Vc7\vcpackages\csproj.dll"

--
Matt Berther
http://www.mattberther.com

> Hi Experts,
> I have Visual Studio 2003 Installed in my Windows 2003 Sever. However,
> I have problems in creating new Projects, Classes, Forms etc. When I
> try to create New projects, I get an error that some wizard is
> missing and I get an empty project opened. There are no forms,
> web.config, global.asax nor any references set. I need to add all
> manually.
> I am still getting the error, when I try to add new forms/
> classes/User controls to any of the projects.
> The following error I got when I tried to add a new class file.
> Could not run the 'C:\Program Files\Microsoft Visual Studio .NET 2003
> VC#\CSharpProjectItems\WebProjectItems\..\CSharpAd dClassWiz.vsz'
> wizard.
> Can anyone tell me how to solve this problem.
> Thanking in advance
> Regards
> Ganesh
Thanx Matt for your reply. It was really helpful.

Regards
Ganesh

"Matt Berther" <mberther@.hotmail.com> wrote in message
news:6846946632388960337567249@.news.microsoft.com. ..
> Hello Ganesh,
> Try this:
> regsvr32.exe "c:\program files\Microsoft Visual Studio .NET
2003\Vc7\vcpackages\csproj.dll"
> --
> Matt Berther
> http://www.mattberther.com
> > Hi Experts,
> > I have Visual Studio 2003 Installed in my Windows 2003 Sever. However,
> > I have problems in creating new Projects, Classes, Forms etc. When I
> > try to create New projects, I get an error that some wizard is
> > missing and I get an empty project opened. There are no forms,
> > web.config, global.asax nor any references set. I need to add all
> > manually.
> > I am still getting the error, when I try to add new forms/
> > classes/User controls to any of the projects.
> > The following error I got when I tried to add a new class file.
> > Could not run the 'C:\Program Files\Microsoft Visual Studio .NET 2003
> > VC#\CSharpProjectItems\WebProjectItems\..\CSharpAd dClassWiz.vsz'
> > wizard.
> > Can anyone tell me how to solve this problem.
> > Thanking in advance
> > Regards
> > Ganesh

Tuesday, March 13, 2012

Strange Problem in dot net framework 2.0

Hi Experts
We are uploading files on the server using HtmlInputfile control with
visual studio 2005, 2.0. In this there is an option for user to keep on
uploading the files finally file actually uploaded on the server after
clicking Upload Button. So when user add the file we store the content of
HTMLInputfile control in session object. This overall functionality is
working in visual studio 2002, 1.0 environment but the problem we are facing
in 2005 is , The Posted file from session object is becoming “Nothing”
Please let us know the solution.
Thanks & Regards
NetajiYou are confusing technologies a bit. Visual Studio doesn't run on the
server so I assume you mean that the session object is null on a server
running ASP.NET 1.0. Where as, on another server running 2.0 (since they
can't possibly be the same server), the session object works correctly. If
this is correct, review your session time-out settings on the 1.0 server. If
it is not, please explain further.
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
"Netaji" <Netaji@.discussions.microsoft.com> wrote in message
news:C6D35A8B-DCCF-4DD2-BA15-6AEEC572DAB5@.microsoft.com...
> Hi Experts
> We are uploading files on the server using HtmlInputfile control with
> visual studio 2005, 2.0. In this there is an option for user to keep on
> uploading the files finally file actually uploaded on the server after
> clicking Upload Button. So when user add the file we store the content of
> HTMLInputfile control in session object. This overall functionality is
> working in visual studio 2002, 1.0 environment but the problem we are
> facing
> in 2005 is , The Posted file from session object is becoming “Nothing”
> Please let us know the solution.
> Thanks & Regards
> Netaji
>
Hi Alvin
Thank you very much for the reply.
I think it is not session time out issue. becuase on both the server session
are a alive but only one property is getting blank if we execute the same
code in 2.0 framework. below is detail explaination.
We are using htmlinput file control to upload files and storing this
uploaded files across multiple post back in session object which is working
very fine in asp.net 1.0 framework
When we are trying to use the same thing in asp.net 2.0 framework the stored
htmlinputfile content is getting nothing from session . session object is
still there but we are not able to acess the
htmlinputfile.postedfile.filename properties it shows nothing which means
that is is not session expiry problem since all the session are working
properly.
Please let me know if you require more clarification..
Really appriciate your input on this issue...
Thanks
Netaji
"Alvin Bruney [ASP.NET MVP]" wrote:
> You are confusing technologies a bit. Visual Studio doesn't run on the
> server so I assume you mean that the session object is null on a server
> running ASP.NET 1.0. Where as, on another server running 2.0 (since they
> can't possibly be the same server), the session object works correctly. If
> this is correct, review your session time-out settings on the 1.0 server.
If
> it is not, please explain further.
> --
> --
> Regards,
> Alvin Bruney [MVP ASP.NET]
> [Shameless Author plug]
> The O.W.C. Black Book, 2nd Edition
> Exclusively on www.lulu.com/owc $19.99
>
> "Netaji" <Netaji@.discussions.microsoft.com> wrote in message
> news:C6D35A8B-DCCF-4DD2-BA15-6AEEC572DAB5@.microsoft.com...