sujimon 0 Light Poster

Hi,

I want to learn Sharepoint. Over the past few days I was setting up a Virtual Machine for Sharepoint server and looking for artciles on the web.

I was wondering if it is sufficient to install WSS 3.0 on my Virtual Machine to set a Sharepoint server or it is necessary to install MOSS2007.

Please advise.

sujimon 0 Light Poster

I was missing the @ sign in command line , the following command line resolved the issue:-
SQL> @C:\app\thoshiba\product\11.2.0\dbhome_1\RDBMS\ADMIN\dbmsclr.plb

sujimon 0 Light Poster

I just finished installing ODTwithODAC112012 (Oracle Developer tool for Visual Studio ODT) on my system . Now I am trying to deploy dbmsclr.plb as SYSDBA from SQLPLUS

But I am getting the error SP2-024 nothing to change.

Here is the command window:-

C:>sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Tue Aug 14 22:59:39 2012

Copyright (c) 1982, 2010, Oracle. All rights reserved.

SQL> connect sys/Bel29072012 as SYSDBA
Connected.
SQL> C:\app\thoshiba\product\11.2.0\dbhome_1\RDBMS\ADMIN\dbmsclr.plb
SP2-0024: Nothing to change.
SQL> select count(*) from all_objects where object_name='DBMS_CLR';

COUNT(*)
     0

SQL> select count(*) from all_objects where object_name='DBMS_CLR' AND owner='SYS';

COUNT(*)
     0

SQL>

Please let me know how to overcome this issue.

Regards

sujimon 0 Light Poster

Hi,

I am new to Oracle. I have installed Oracle 11g R2 standard edition (server software, 2GB download from Oracle).

I found that the 'Environment Variable PATH' has not been set. Which of these directory should I use for the PATH value:-
1. Oracle base, 2. Software location or 3. Database file location

Also do I need to create 'TNS_ADMIN' environment variable and 'TNSNAMES.ora' file

Kindly advice. Thank you

sujimon 0 Light Poster

Hi I want to install the following on my new laptop:-
1. VB6
2. Crystal Reports 8.5
3. Crystal Reports 9
4. SQL Server 2005
5. VS 2005
6. SQL Server 2008/SQL Server 2008 R2
7. VS 2008
8. Oracle Server
9. Microsoft Office 2007

What sequence should i follow so that everything will work fine?

sujimon 0 Light Poster

Hi

I have developed an ASP.NET Crystal Reports website on my machine (VS-2005, x86 pc). I have included the following 'Mergemodules from Crystal' in my websetup. -
- Microsoft_VC80_ATL_x86.msm
- policy_8_0_Microsoft_VC80_ATL_x86.msm
- CrystalReportRedist2005_x86.msm

This website worked fine when I deployed to Windows server 2008 machine.
However, when I deployed to Windows Server 2003 X64 on client's Server. I got the error :- 'Type Initialiser for CrystalDecisions.CrystalReports.Engine.ReportDocument threw an exception.

I firmly think this is because I need a different version of the MergeModules or Crystal Runtime specific for an X64 machine.
Kindly let me know your suggestions to resolve this problem

sujimon 0 Light Poster

I have a storedProcedure in SQL-Server that I am using to delete duplicates from one of the tables. This storedprocedure makes use of a cursor.

I tried to create the same storedprocedure in microsoft access by just replacing the 'CREATE PROCEDURE' with 'CREATE PROC' but it didn't seem to work.

Can anyone provide some workaround?

Here is the SQL- storedprocedure:-

ALTER PROCEDURE [dbo].[csp_loginfo_duplicates] AS BEGIN

SET NOCOUNT ON;

declare @minrowid bigint 
declare @empid nvarchar(15) 
declare @dtpunched datetime 
declare @count tinyint

declare curDuplicate cursor for select empid,dtpunched,count(*),min(row_id) from loginfo group by empid,dtpunched having count(*)>1

open curDuplicate

fetch next from curduplicate into @empid,@dtpunched,@count,@minrowid

while (@@fetch_status=0) begin delete from loginfo where empid=@empid and dtpunched=@dtpunched and row_id<>@minrowid fetch next from curduplicate into @empid,@dtpunched,@count,@minrowid

end

close curDuplicate 
deallocate curDuplicate 
END
sujimon 0 Light Poster

thanks this helped me too !!

sujimon 0 Light Poster

I have developed my website in VS-2005 and built in CrystalReports.

I found that after deploying the website to Windows2008Server I am unable to use the 'Export' button on CrystalReport to export to other format (excel, word, pdf) and I am getting an Access denied file in use error.

Export buttons work fine when I deploy it to my local machine with XPSP3

I have created a Custom Websetup that will prompt Machine Logon credentials & connectionString. I use machine logon credentials to 'Impersonate' in web.config.

I gave full permission to IUSR & IIS_IUSR account on Windows Temp and after Websharing this folder is showing up and accessible on the FileServer. Also the Windows Account used to Impersonate is an Administrator account.

One thing I want to try is to change the output directory of the reports to a subdirectory withing the root folder. But I am not sure if it would work. So I would like to have your valuable advice on this issue. Thanks !

sujimon 0 Light Poster

The issue was because I had not put an image inside the root folder in the client machine. This image was being referred in the dataGridView_CellPainting eventhandler and hence the dataGridView was not showing.

I should have followed the standard practise of adding the images to the Project Resources. I also replaced the custom control with a normal dataGridView and things are fine and working now.

The issue with the CMS was because of user privileges based on roles. So CMS is showing up only for authorized users.

sujimon 0 Light Poster

Hi,

I would like to know the correct procedure to deploy windows application in VS-2005.

There are some specific issues I am facing after deploying the project to the client machine.

- I have a CMS (ContextMenuStrip) in one of my forms associated with a TreeView and its not showing.

- Another form that contains a custom DataGridView which i created by subclassing default DataGridView is not showing this control.

DETAILS:-

- Everything works fine on my machine.

- I BUILD the project in the RELEASE mode

- From the bin\Release folder copied the .exe to the client machine in the root, also copied the Reports to the root on client. Is this correct way to deploy?

- Instead of setting the CMS property of the TreeView, I instantiated a CMS in my form, assigned it to CMS property of TreeNodes when TreeNodes are populated programmatically.

Please suggest some tips and work around ASAP. I can post the code if you would like to have a look. BYE

sujimon 0 Light Poster

hi,

This can be done using TemplateFields

<asp:GridView ID="" runat="" autogeneratecolumns=".....>
<columns>
  <!--Add 5 TemplateFields for your 5 columns -->
  <!--lets say only the first column is updatable -->
   <asp:TemplateField>
       <itemTemplate>
          <asp:Label ID="lblSalary" runat="server" Text='<%#Eval('Dbcolname')%>'>         
       </itemTemplate>

       <EditItemTemplate>
           <asp:TextBox ID="txtSalary" runat="server" Text='<%#Eval('Dbcolname')%>'> 
       <EditItemTemplate>
  </asp:TemplateField>

   <asp:TemplateField>
      <itemTemplate>......</itemTemplate>
   </asp:TemplateField>

   <asp:TemplateField>
     <itemTemplate>......</itemTemplate>
   </asp:TemplateField>

   <asp:TemplateField>
    <itemTemplate>.... </itemTemplate>
  </asp:TemplateField>

   <asp:TemplateField>
     <itemTemplate>......</itemTemplate>
   </asp:TemplateField>
</columns>

When user clicks on the Edit button, the fields that have EditItemTemplate defined for it will show up that control that has been declared in EdititemTemplate. In our case textbox txtSalary for column 1, allowing user to enter values.

Other rows dont have the EdititemTemplate defined and hence will always show up the label declare in <ItemTemplate>.

And you know how to handle the 'UPDATE/DELETE'. Let me know if you need more info

sujimon 0 Light Poster

I think the connectionString format should be of the following:-

Data Source=Servername;Initial Catalog=Db1;Persist Security Info=true;User ID=myuserid;Password=123;

OR

Data Source=Servername;Initial Catalog=Db1;Persist Security Info=true;Integrated Security=true;

NOTE:- for remote connections the Servername is the IP-Addr of the database server you can get this from aspspider

This new connection string should work. You may have to contact aspspider for the Servername attribute as well as the login ID and password.

In case, you have yourself created a new database using the Control Panel you will have the credentials. (SQL-Server default username is 'sa' and password empty)

sujimon 0 Light Poster

Finally resolved this issue by using 'Impersonation'

<system.web>
<identity impersonate="true" userName="DOMAIN\username" password="mypass"/>
</system.web>

If you want to lookup the domain for confirmation go to IIS (wrt IIS 5.1 that comes with Windows XP SP2),
1> right click your website select properties,
2> then Directory security tab,
3>then in anonymous access click edit,
4>then click advanced to search for users
5>then click Find Now

From the list of users you will be able to find the account that you use to login, the domain is the Directory.

HAPPY CODING !!

sujimon 0 Light Poster

thanks ...actually connection is okk. when i update table without where condition ,query is running but with where condition error comes- multi part attribute can not b bound.

Try changing aspnet_membership.Email to email

OR

try changing userid in the where clause to aspnet_membership.userid.

OR even better would be like

update aspnet_membership a SET a.Email='" & Email.Text & "' WHERE a.UserId='" & Session("id") & "'"

And let me know what is the outcome.

sujimon 0 Light Poster

Hai i need a coding for Login and its validation in asp.net using vb.net.. Am currently using SQL Server Express Edition 2005 software as my backend...

Hi,

You can follow the steps in the other answer that will work good. However, if you don't need all the features of 'Role base Authentication/Authorization' then I would suggest that you go for basic 'FormsAuthentication'.

I guess you are doing it for the first time. In that case, i would suggest that you first learn to implement 'Forms Authentication'. The Role Based Authentication/Authorization discussed has lot more things to be done and is an extension of FormsAuthentication.

You can find step by step instructions HERE

sujimon 0 Light Poster

hi,

For each of the validation controls, you need to add one more attribute 'ValidationGroup'. This should be same for all the controls say 'vg'. Also add this attribute to the Submit button and then it should work fine.

sujimon 0 Light Poster

Hi,

I am coding the loginpage, i want know how to code

1.) To check whether the User entered username,pwd matches with any of the rows of database data, if it is so it should navigate to next page like inbox.aspx.


As i am new to Asp.net, please help me to know this.


Thanks.

Hi,

I agree with the solution given by Rohan.

However, as you are new to ASP.NET I would suggest that once you get this working. Go ahead and try implementing Forms Based Authentication and then move on to Role Bases Authentication Authorization.

Read on Forms Authentication here

sujimon 0 Light Poster

Hi Everyone

I have two aspx pages that updates two values in a database.

I have an update button called Button1.

Button1 in the first page redirects to the second aspx page.

On the second page i want to select a value and then redirect to the first page.

How do i then get the value that is returned from the second Page? and the use it in Button1's method?

Response.Redirect("Pagetwo.aspx");
Label1.Text = Request.QueryString["sp"];

Hi,

You can do this easily using JavaScript !

window.open('PageTwo.aspx')

Then suppose in the child window the user has selected a value in Dropdown and then clicked the Submit button. Now in the submit button eventhandler, call the a function in the parent window (firstpage.aspx) using syntax :-

window.opener.functionName('selectedvalueindropdown')

The selected value also gets passed to parent window. Now inside the parent windows function set the Label1 to parameter it received.

BYE

sujimon 0 Light Poster

Hi,

I tried few more steps but no luck.

1> Created a new 'ASP.NET Crystal Report website' in the Computer with the issue. On running the reports worked fine. However, when I deployed this to the IIS on the same Computer, reports failed with the same error: Invalid Class String, COM Exception:0x80004005

2> Add merge module 'CrystalReport10_NET_EmbeddedReporting.msm' as per the instructions in the downloaded file from the Business Objects website but the issue is still there (http://websmp130.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/spn/bobj_download/main.htm)

3> I found this link at msdn site :- (http://ironspeed.com/Designer/3.2.4/WebHelp/Part_V/Load_Report_Failed.htm)

It says :- Make sure the ASPNET account has permissions to open the file. Make sure the folder containing the file and the file itself has the same permissions as your application folder.

So I right clicked the report files in IIS, selected Properties, File Security and found that the 'IUSR-ComputerName' is configured for anonymous access as well as the Integrated Windows Authentication is checked.

Then as per the instructions here set the anonymous access for the ComputerName\ASPNET account leaving the IntegratedWindowsAuthentication checkbox checked and the issue is still there. I am quite sure that the report paths are correct and I haveupdated the DataSource location for the reports from Visual Studio.

Tomorrow I need to go through the other links as well but in the meantime if someone has more ideas please let me know as it will save precious time.
Thanks in advance

sujimon 0 Light Poster

Hi,

The website that I have been working on for sometime is about to be deployed now.

However, after deployment the reports are not opening in one of the two machines that I have deployed. All other pages seem to be working fine except reports not opening with the error :

Invalid Class String
COM Exception: 0x80004005

(on the line :- CrystalReportEngine.Load(Server.MapPath(Session("ReportPath")))

These are the steps that I have taken so far:-

1> Installed Crystal repors for .net framework 2.0 from :-

C:\Program Files\Visual Studio 8\SDK\Bootstrapper\Packages\Crystal Reports

Also installed the following:-
1> IIS
2> .net fwk 2.0
3> sql server 2005


2> First Added references to the following dlls:-

CrystalDecisions.CrystalReports.Engine.dll
CrystalDecisions.ReportSource.dll
CrystalDecisions.Shared.dll
CrystalDecisions.Web.dll
CrystalDecisions.Windows.Forms.dll

(all these dlls were found in C:\Program Files\Common Files\Business Objects\2.7\Managed)

After adding these references the corresponding entries were made in webconfig and also found it in Project Propery pages under references as GAC.

Then copied these dlls to the bin.

3>Here is the complete web.config

<?xml version="1.0"?>
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
	<configSections>		
		<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, …
sujimon 0 Light Poster

HI,

I want to transfer a text file from local machine to linux server using ftp in Visual Basic 6.0.
Can you please share your thoughts on how to acheive this?

sujimon 0 Light Poster

Hi Ashish,
I was able to resolve the issue.
I had to set the trigger to 'PostBackTrigger' instead of 'AsyncPostbackTrigger' inside the UpdatePanel for the 'Upload' button.

sujimon 0 Light Poster

Hi,

I am using VS-2005.
In my website I have used the html input control with type=file.

The problem is that when I place this control inside an 'UpdatePanel' the 'PostedFile' property becomes 'Nothing' on postback. So in order to get things working I have removed the 'UpdatePanel' and things are working fine.

However, I am interested to know what kind of workaround is required if I were to use an 'UpdatePanel'? In one of the threads at forums.asp.net I found that we need to set a 'PostBackHandler' for the update panel. I have no idea how to implement this. Does it refer to 'AsyncPostbackTrigger' or 'SyncPostBackTrigger'?

Can someone give an idea how to implement this?

sujimon 0 Light Poster

http://www.asp.net/security/tutorials/user-based-authorization-cs

http://www.asp.net/security/tutorials/validating-user-credentials-against-the-membership-user-store-cs

try these two links and let me know the output.

and please use GETAUTHCOOKIE, SETAUTHCOOKIE, FormsAuthenticationRedirectFromLogin Page, they are very powerful feature of FormsAuthentication..

very easy and handy..

Hi Ashish,
Thanks for sharing these useful links.
I have bookmarked it as well as saved the html pages and will look into it for sure.

For the time being I was able to resolve the issue.
Inside the <authentication></authentication> tags removed the path attribute for the <forms> tag in web.config this fixed the issue. Now my authentication tag looks as follows :-

<authentication mode="Forms">
<forms name=".ASPXFORMSDEMO" loginUrl="~/Login.aspx" cookieless="UseCookies" />
</authentication>
bye

sujimon 0 Light Poster

Hi,
I am using Forms Authentication in my VS-2005 website.

In case of wrong credentials or while explicitly requesting protected pages the website is able to redirect user to login page. However, when correct login credentials are provided the application is not able to redirect the user to the desired page.

While debugging I found that 'Request.IsAuthenticated=False' just before I redirect the user to the desired page. While coding I thought that this property will be set to true automatically after I generate the Authentication ticket. So do I need to set it explicitly inside the submit button click on Login page after validation?

BTW I have not used the 'GetAuthcookie', 'SetAuthCookie' or 'RedirectFromLoginPage' methods.
I am posting the code inside the submit button click on the Login page as well as the Authentication and Authorization tags in web.config.

<authentication mode="Forms">
      <forms name=".ASPXFORMSDEMO" loginUrl="~/Login.aspx" cookieless="UseCookies" path="~/"/>
    </authentication>
    <authorization>
      <deny users="?"/>
    </authorization>
Protected Sub btnsubmit_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsubmit.Click
        'here first validate if the user is valid user
        ad = New Aranya_Data
        Dim code As Integer = ad.validateuser(txtuserid.Text, txtpwd.Text)

        'need to implement forms authentication here
        If code = 0 Then
            'creating the authentication ticket

            Dim tkt As FormsAuthenticationTicket
            Dim cookiestr As String = ""
            Dim ck As HttpCookie
            tkt = New FormsAuthenticationTicket(1, txtuserid.Text, DateTime.Now, DateTime.Now.AddMinutes(30), chkRemember.Checked, "14062010")
            cookiestr = FormsAuthentication.Encrypt(tkt)
            ck = New HttpCookie(FormsAuthentication.FormsCookieName, cookiestr)
            If chkRemember.Checked Then
                ck.Expires = tkt.Expiration
            End If
            ck.Path = FormsAuthentication.FormsCookiePath
            Response.Cookies.Add(ck)
            Dim strRedirect As String …
sujimon 0 Light Poster

Hi,

I was able to fix this issue after generating an authentication ticket.

Inside the login button click eventhandler I have added the code to create 'Authentication Ticket'. After that on the target page I am checking the value of the Cookie Request.Cookies(FormsAuthentication.FormsCookieName).Value. For invalid username & password combination and also when the user simply request any page without logging in the expression 'Request.Cookies(FormsAuthentication.FormsCookieName).Value' throws an object reference exception and hence in the Catch part of Try block I am redirecting such users to login page. In addition to all these inside the 'Page_Load' event of the target page I have added the following line to prevent users from using back button after logging out:-

Page.Response.AppendHeader("Cache-Control", "no-store, no-cache, must-revalidate, post-check=0, pre-check=0");

I have referred the article at http://support.microsoft.com/kb/301240 for code to generate authentication ticket

Protected Sub btnsubmit_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsubmit.Click
        'here first validate if the user is valid user
        ad = New Aranya_Data
        Dim code As Integer = ad.validateuser(txtuserid.Text, txtpwd.Text)

        'need to implement forms authentication here
        If code = 0 Then
            'creating the authentication ticket

            Dim tkt As FormsAuthenticationTicket
            Dim cookiestr As String = ""
            Dim ck As HttpCookie
            tkt = New FormsAuthenticationTicket(1, txtuserid.Text, DateTime.Now, DateTime.Now.AddMinutes(30), chkRemember.Checked, "14062010")
            cookiestr = FormsAuthentication.Encrypt(tkt)
            ck = New HttpCookie(FormsAuthentication.FormsCookieName, cookiestr)
            If chkRemember.Checked Then
                ck.Expires = tkt.Expiration
            End If
            ck.Path = FormsAuthentication.FormsCookiePath
            Response.Cookies.Add(ck)
            Dim strRedirect As String = ""
            strRedirect = Request("ReturnUrl")
            If strRedirect Is Nothing Then
                strRedirect = "~/FirstForm.aspx"
            End If
            Response.Redirect(strRedirect) …
sujimon 0 Light Poster

1>Double click on the access database to open it then save it in the access 2002-2003
format i.e with the .mdb extension.
2>Next put this database in the App_Data folder of your website. If you dont have the
App_Data folder then create it.
3>Now your connection string in web.config would be as follows:-
<add name="accessconstr" connectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source= |DataDirectory|MySite_Database.mdb" providerName="System.Data.OleDb"/>

I am able to estb connection to the db using this connection string but the issue with my website is that I am not able to implement the forms authentication if you have any suggestion do let me know. I can directly type the addr of desired page in browser and the page is displayed even if user is not logged in.

sujimon 0 Light Poster

Hi,
I forgot to mention. Our requirement is use an access db as this is a simple project and we want to avoid the cost of hosting an SQL Server database so kindly suggest what kind of authentication and authorization can be used here.

sujimon 0 Light Poster

Hi Guys,

I am trying to implement FormsAuthentication in my asp.net website.
I am using VS-2005. The login page in my application is "Default.aspx" from this page I want to redirect the user to "FirstForm.aspx". However, if I type the address of the target page when in login page I am able to request this page without logging in.

I have added the following lines to my web.config

<authentication mode="Forms">
      <forms name=".ASPXFORMSDEMO" loginUrl="Default.aspx" 
      protection="All" path="~/" timeout="30" />
 </authentication>

<authorization>
        <deny users="?"/>
	<!--<allow users="*" />-->
</authorization>

The code inside the login button eventhandler is as follows:-

ad = New Aranya_Data
        Dim code As Integer = ad.validateuser(txtuserid.Text, txtpwd.Text)

        'need to implement forms authentication here
        If code = 0 Then
            FormsAuthentication.RedirectFromLoginPage(txtuserid.Text, False)
        Else
            Response.Redirect("~/Default.aspx")
        End If

Here the validateuser method is declared in class module Aranya_Data which is used to lookup the database and validate the userid and password and return 0 on successful validation.

When I request a page without logging the browser displays the pg and at the bottom it displays script error. On checking details says "Sys not defined at few places and syntax error at one place"

I have used an access database and put it inside 'App_Data' folder and the connection string is declared in web.config. Will using an access db make a diff?

Please let me know your valuable suggestion to resolve this issue as soon as possible

Thanks in adv,
Sujit

sujimon 0 Light Poster

Hi,

I am Sujit from Bangalore, India.
I am new hear and hope to learn from you guys and share whatever bit I know.
Currently I am working as a VBNET/ASPNET programmer.

Hope to hear from u soon.:icon_wink:
BYE