|
Damn it ...
"Why simple, if there's a difficult way"
(German saying )
Thank you, thats a pretty easy way to solve this problem.
Seems as if we had thought too complicated.
|
|
|
|
|
Let me start off by saying that I apologize in advanced if this isn't the correct forum for this question, but there didn't seem to be a forum that exactly matched the question/issue I'm having.
I'm a VB.NET developer and I like to expand by knowledge by trying to program things from scratch that are already implemented ih the.NET framework. My current project is programming a SMTP server using just sockets. I've already read the RFC on SMTP and my company has an Exchange Server (2007) that I was going to use for testing.
The web address of the server is exchange.mycompany.com and I used reverse DNS to get the IP adress. The domain name does have a MX record a well. From the command prompt on my computer (which is running Win7 Professional) I tried using telnet to connect on port 25. I tried using the domain name as well as the IP address, but both times it said it couldn't connect to the server on port 25.
I checked the settings ih Outlook and the port is correct. I then tried connecting on port 110, and some other ones that are sometimes used, and it gave the same error message.
Next I connected to the Exchange server through VPN and tried telnet again on port 25 and this time it worked. However in the SMTP banner it said remote.mycompany.com instead of exchange.mycompany.com. So I disconnected from the VPN and tried the telnet again on all the ports I initially tried but used remote.mycompany.com but again got the same error message. I did an IP address lookup and remote.mycompany.com and exchange.mycompany.com point to the same IP address.
I then used mxtools.com and dnsstuff.com (I think that was the adress) and used their SMTP tools to see of they could connect. I entered mycompany.com as the domain name and they looked up the MX record, which returns exchange.mycompany.com as the SMTP server, and both tools were able to connect with no issues identified.
So my questions: 1) If the MX record list exchange.mycompany.com as the SMTP sever, why does the banner return remote.mycompany.com? 2) Why can't I connect the SMTP server through telnet unless I'm connected through VPN, but the two websites I used to test it the connection worked?
Obviously the server works because because the two websites can connect to it, I can when I'm in VPN, and other servers can because I receive email on my corporate account. What could prevent my computer from connecting to the SMTP server through telnet when I'm not on VPN. I should also mention that I even tried turning off all my anti-virus software to make sure that it wasn't blocking it.
Any help would be greatly appreciated since I assuming if I can't telnet in I most likely wouldn't be able to connect through sockets so I can't start working on my project until I solve this.
Thanks,
Dominick
|
|
|
|
|
Sounds like a network security issue.
vbmike
|
|
|
|
|
Originally I thought that maybe it was because Port 25 is closed on my home router. However, if Port 25 was closed on my router would I still be able to connect while I'm on VPN?
|
|
|
|
|
It is unlikely that you can connect directly from home to your company server through normal internet, as most company exchange servers do not allow connections from outside their intranet. When you use VPN you are, presumably, going via the company's intranet and thus seen as a valid user.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I'm not trying to connect to it so I can send an email through the server. What I was trying to understand how to do was to deliver and email to it. For example, if I build an SMTP server and a client which connects to my that SMTP server and I want to send an email to webmaster@mycompany.com (where mycompany.com is hosted on the Exchange server), how would the SMTP server I created connect to the Exchange server in order to deliver the email? Doesn't the Exchange server have to allow some sort of connection from outside the intranet in order to receive emails from other domains (gmail, yahoo, etc.)?
|
|
|
|
|
DisIsHoody wrote: Doesn't the Exchange server have to allow some sort of connection from outside the intranet in order to receive emails Yes, of course it does, but I cannot say why your attempt at connection was rejected. Maybe you should talk to your Exchange administrator for more details on what restrictions the server has.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I'm going to have to try and do that, unfortunately the person who set it up is no longer with the company and we just have an outsourced IT company that maintains it and they usually aren't very help fully. However, because the web tools were able to connect to is it reasonable to assume the problem is on my end? I was thinking maybe because I dont have a domain name so if the Exchange server tries to lookup the IP address of my computer there is no MX or PTR record. Is this something SMTP servers look for?
I also found something that I dont know how to explain or how it may affect this. The MX record for the server list exchange.mycompany.com. However, even when I'm on VPN, I can't connect to the SMTP server using that address in telnet or the IP address it points to. I have to use remote.mycompany.com, which is shown in the SMTP banner and points to the SAME IP ADDRESS. Is there a setting in Exchange that makes it script only request coming from this address? If so, how do the online SMTP tools discover this subdomain when I only gave the tools the domain name (mycompany.com) and the MX record only shows exchange.mycompany.com? The address remote.mycomany.com is not located anywhere in the zone file.
|
|
|
|
|
I'm afraid you are getting deep into the Exchange server now, which is not something I have worked with.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Okay thanks...I'm going to move this thread over to the Hosting/Server forum. Hopefully someone familiar with Exchange will be able to figure this out. I appreciate your help thus far.
|
|
|
|
|
We use XSLT to convert various XML files into tab delimited.
Some of the XML input files have a variable number of options. Sometimes none, others 1,2,3 or more.
This makes the formatting difficult since there is also a header row that is created in the XSLT file that must have the exact number of columns and proper header context.
So the question is how to get this formatted correctly since if we provide for 2 sets of opts (from the W3Schools tryit) in the header row how to get the for-each to stop at 2.
<cd>
<title>Eros</title>
<artist>Eros Ramazzotti</artist>
<country>EU</country>
<company>BMG</company>
<price>9.90</price>
<year>1997</year>
</cd>
<cd>
<opts length="3">
<opt><name>Nm1</name><val>111</val></opt>
<opt><name>Nm2</name><val>222</val></opt>
<opt><name>Nm3</name><val>333</val></opt>
</opts>
Typical for-each
<xsl:for-each select="opts/opt">
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="val"/></td>
</xsl:for-each>
In this case there will be 3 sets of opts but 2 sets of headers and all data after this will be off.
Tried using xls:when test="@length =...' but don't see a way of just getting 2 of the 3 opts.
Can anyone help?
Thanks
|
|
|
|
|
|
Thanks
Yes, using the Position() function did help but part 2 of this was still a lot more code that had to be added to complete what I needed to and I do not like it.
<b>How do we code for the mininum number of iternations when the input XML has less than the minimum?</b>
The Position did limit the output to the number of iterations we needed to see but it did nothing to fill in if the number of iterations was LESS that what we expected.
In our case the input XML had a length attribute.
<pre lang="xml">
<Opt length="1"><Opts>data</Opts></Opt></pre>
So we had to add a bunch of if or choose statements
<xls:if test="@length = "1">
...fill put in 4 output empty values
</xls:if>
<xls:if test="@length = "2">
...fill put in 3 output empty values
</xls:if>
Is there a better way?
-- modified 17-Dec-12 6:52am.
|
|
|
|
|
Hi,
I haven't done anything like this before but I did a quick bit of hunting around and something like this might do it for you. Please note this is totally untested and is just an idea. I thought about how to do a while or a normal for loop in XSL and then try and find away of checking if the <opt> element at position x existed. This is cobbled together from a couple of SO posts and my own take on how to put it together.
Sources:
http://stackoverflow.com/questions/11127693/how-to-do-a-while-like-loop-in-xslt[^]
http://stackoverflow.com/questions/5791053/xslt-if-tag-exists-apply-template-if-not-choose-static-value[^]
http://www.sourceware.org/ml/xsl-list/2000-08/msg01503.html[^]
From those articles this is what I have cobbled together:
<xsl:template name="for_loop">
<xsl:param name="num">1</xsl:param>
<xsl:param name="limit"></xsl:param>
<xsl:if test="not($num = $limit)">
<xsl:choose>
<xsl:when test="not(opt[position() = $num)">
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
<xsl:call-template name="for_loop">
<xsl:with-param name="num">
<xsl:value-of select="$num + 1">
</xsl:with-param>
<xsl:with-param name="limit">
<xsl:value-of select="$limit">
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
Hope this helps.
Chris
|
|
|
|
|
Yes, I started to look at params and variables but with the complexity of the multiple templates I just could not get it to work. The XSLT is too big as it is and it was hard to put it all together.
I will have to re-look at it and perhaps test with a small XSLT until I can get the multi-templates and for loop template to work.
Thanks!
|
|
|
|
|
 Hi,
not sure if this is any help, I have used this to produce a student timetable grid. It does not do anything fancy at all, but it does use params and nested templates. It's quite old now and i'm sure it could be improved no end but it works well and might be of interest.
Chris
="1.0"="UTF-8"
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:if test="pupil/details[count(.) != 0]">
<h1>Week A</h1>
<table class="ec-gridview" width="100%">
<xsl:apply-templates select="pupil/details [@weekCode='A'][1]" mode="weekheader"/>
<xsl:apply-templates select="pupil/details [@weekCode='A'][1]" mode="weekdata">
<xsl:with-param name="week">A</xsl:with-param>
</xsl:apply-templates>
</table>
<xsl:apply-templates select="pupil/details [@weekCode='A'][1]" mode="ott">
<xsl:with-param name="week">A</xsl:with-param>
</xsl:apply-templates>
<br/>
<h1>Week B</h1>
<table class="ec-gridview" width="100%">
<xsl:apply-templates select="pupil/details [@weekCode='B'][1]" mode="weekheader"/>
<xsl:apply-templates select="pupil/details [@weekCode='B'][1]" mode="weekdata">
<xsl:with-param name="week">B</xsl:with-param>
</xsl:apply-templates>
</table>
<xsl:apply-templates select="pupil/details [@weekCode='B'][1]" mode="ott">
<xsl:with-param name="week">B</xsl:with-param>
</xsl:apply-templates>
</xsl:if>
</xsl:template>
<xsl:template match="details" mode="weekheader">
<tr class="ec-gridrow-header">
<th class="ec-gridheader" scope="col" style="width:5%;text-align:center"></th>
<th class="ec-gridheader" scope="col" style="width:16%;text-align:center">Mon</th>
<th class="ec-gridheader" scope="col" style="width:16%;text-align:center">Tue</th>
<th class="ec-gridheader" scope="col" style="width:16%;text-align:center">Wed</th>
<th class="ec-gridheader" scope="col" style="width:16%;text-align:center">Thu</th>
<th class="ec-gridheader" scope="col" style="width:16%;text-align:center">Fri</th>
<th class="ec-gridheader" scope="col" style="width:16%;text-align:center">Sat</th>
</tr>
</xsl:template>
<xsl:template match="details" mode="weekdata">
<xsl:param name="week"/>
<tr class="ec-odd-line">
<td class="ms-vb" style="vertical-align:text-top;text-align:center">
1
</td>
<xsl:apply-templates select="//details[@lessonNumber='1' and @weekCode=$week]" mode="p1-6"/>
</tr>
<tr class="ec-even-line">
<td class="ms-vb" style="vertical-align:text-top;text-align:center">
2
</td>
<xsl:apply-templates select="//details[@lessonNumber='2' and @weekCode=$week]" mode="p1-6"/>
</tr>
</xsl:template>
<xsl:template match="details" mode="ott">
<xsl:param name="week"/>
<xsl:if test="count(//details [@lessonNumber > 299 and @weekCode=$week]) != 0">
<h1 class="ms-rteCustom-ArticleHeadLine">Lessons not on the timetable</h1>
<xsl:for-each select="//details [@lessonNumber > 299 and @weekCode=$week]">
<a>
<xsl:attribute name="href">
../Information/Set/SetLists.aspx?IsetCode=<xsl:value-of select="@setCode"/>
</xsl:attribute>
<xsl:value-of select="@setCode"/>
</a> (<xsl:value-of select="@subjectName"/>) <xsl:value-of select="@description"/><br/>
</xsl:for-each>
</xsl:if>
</xsl:template>
<xsl:template match="details" mode="p1-6">
<xsl:for-each select=".">
<td style="vertical-align:text-top;text-align:center;min-height:60px;">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@currentLesson = 'Y'">ms-vb-cp</xsl:when>
<xsl:when test="@setCode = 'BLANK'">
<xsl:choose>
<xsl:when test ="@dayIndex = '1' and @lessonNumber = '6'">ms-vb-empty</xsl:when>
<xsl:when test ="@dayIndex = '2' and (@lessonNumber = '5' or @lessonNumber = '6')">ms-vb-empty</xsl:when>
<xsl:when test ="@dayIndex = '3' and @lessonNumber = '6'">ms-vb-empty</xsl:when>
<xsl:when test ="@dayIndex = '4' and (@lessonNumber = '5' or @lessonNumber = '6')">ms-vb-empty</xsl:when>
<xsl:when test ="@dayIndex = '5' and @lessonNumber = '6'">ms-vb-empty</xsl:when>
<xsl:when test ="@dayIndex = '6' and (@lessonNumber = '5' or @lessonNumber = '6')">ms-vb-empty</xsl:when>
<xsl:when test ="@dayIndex = '8' and @lessonNumber = '6'">ms-vb-empty</xsl:when>
<xsl:when test ="@dayIndex = '9' and (@lessonNumber = '5' or @lessonNumber = '6')">ms-vb-empty</xsl:when>
<xsl:when test ="@dayIndex = '10' and @lessonNumber = '6'">ms-vb-empty</xsl:when>
<xsl:when test ="@dayIndex = '11' and (@lessonNumber = '5' or @lessonNumber = '6')">ms-vb-empty</xsl:when>
<xsl:when test ="@dayIndex = '12' and @lessonNumber = '6'">ms-vb-empty</xsl:when>
<xsl:when test ="@dayIndex = '13' and (@lessonNumber = '5' or @lessonNumber = '6')">ms-vb-empty</xsl:when>
<xsl:otherwise>ms-vb</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>ms-vb</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:choose>
<xsl:when test="@setCode != 'BLANK'">
<xsl:value-of select="@subjectName"/>
<br/>
<a>
<xsl:attribute name="href">
../Information/Set/SetLists.aspx?IsetCode=<xsl:value-of select="@setCode"/>
</xsl:attribute>
<xsl:value-of select="@setCode"/>
</a>
<br/>
<a>
<xsl:attribute name="href">
../Information/Room/RoomDetails.aspx?IroomCode=<xsl:value-of select="@room"/>
</xsl:attribute>
Room <xsl:value-of select="@room"/>
</a>
<br/>
<xsl:for-each select="teacher">
<xsl:value-of select="@teacher"/>
<br/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:text xml:space="preserve"> </xsl:text>
<br/>
<xsl:text xml:space="preserve"> </xsl:text>
<br/>
<xsl:text xml:space="preserve"> </xsl:text>
<br/>
<xsl:text xml:space="preserve"> </xsl:text>
<br/>
</xsl:otherwise>
</xsl:choose>
</td>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
|
|
|
|
|
Hello, how do I design a pop up menu just like the one on www.list-of-companies.org when you click the country dropdown link.
I would actually prefer a solution that categorizes the link.
Thank you. 
|
|
|
|
|
From my experience this site is more for answering questions when you may encounter problems while you are doing the coding. You could probably find finished products at sites such as This or at sites such as here.
vbmike
|
|
|
|
|
http://jqueryui.com/[^] has lots of nice features. I would just google for jquery plugins that you want and find one that looks like it does what you want.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I've some data, there are
RealData Balance Sort by Desc
A 684 345 A 684
B 60 - E 308
C - - J 302
D - - I 273
E 308 - O 178
F - - H 140
G 11 - B 60
H 140 - N 27
I 273 - Q 22
J 302 - R 20
K - - P 14
L - - G 11
M - - C -
N 27 - D -
O 178 38 F -
P 14 - K -
Q 22 - L -
R 20 4 M -
Description
Proc = Process
Res = Result
Sort by Desc
Get 8 row data
Proc 1 Res 1 Proc 2 Res 2 Proc 3 Res 3 Proc 4 Res 4 Finish for 8 row data
A 684 657 A 657 635 A 635 621 A 621 610 A 610
E 308 281 E 281 259 E 259 245 E 245 234 E 234
J 302 275 J 275 253 J 253 239 J 239 228 J 228
I 273 246 I 246 224 I 224 210 I 210 199 I 199
O 178 151 O 151 129 O 129 115 O 115 104 O 104
H 140 113 H 113 91 H 91 77 H 77 66 H 66
B 60 33 B 33 11 R 20 6 B 11 - R 6
N 27 - Q 22 - P 14 - G 11 - B -
Q 22 22 R 20 20 B 11 11 R 6 6 G -
R 20 20 P 14 14 G 11 11 P - - P -
P 14 14 G 11 11 Q - - Q - - Q -
G 11 11 N - - N - - N - - N -
C - - C - - C - - C - - C -
D - - D - - D - - D - - D -
F - - F - - F - - F - - F -
K - - K - - K - - K - - K -
L - - L - - L - - L - - L -
M - - M - - M - - M - - M -
Result 1 27
Result 2 22
Result 3 14
Result 4 11
Total 1 74 (For 8 row data)
Get 4 row data
Proc 1 Res 1 Proc 2 Res 2 Proc 3 Res 3 Finish for 4 row data
A 610 411 A 411 376 A 376 347 A 347 345
E 234 35 O 104 69 O 69 40 O 40 38
J 228 29 H 66 31 H 31 2 R 6 4
I 199 - E 35 - J 29 - H 2 -
O 104 104 J 29 29 R 6 6 J - -
H 66 66 R 6 6 E - - E - -
R 6 6 I - - I - - I - -
B - - B - - B - - B - -
G - - G - - G - - G - -
P - - P - - P - - P - -
Q - - Q - - Q - - Q - -
N - - N - - N - - N - -
C - - C - - C - - C - -
D - - D - - D - - D - -
F - - F - - F - - F - -
K - - K - - K - - K - -
L - - L - - L - - L - -
M - - M - - M - - M - -
Result 1 199
Result 2 35
Result 3 29
Result 4 2
Total 2 265 (For 4 row data)
How to get this data using Query or Function? And how to using in PHP?
Please help!
Thank you.
Jimmy
|
|
|
|
|
|
Can you advise me what web technologies must use for developing huge Web projects, what frameworks maybe? I want to see all picture elements the future developing system
Now i know only: PHP, CSS, HTML, JavaScript, Jquery, Codeigniter/
|
|
|
|
|
Some of the biggest web sites use PHP/MySQL, some use CodeIgniter as a MVC solution when developing PHP/MySQL solutions. Some use WordPress, which incidentally is PHP/MySQL.
Other websites use ASP.NET with some flavour of SQL Server.
Other solutions include JSP.
But a Google search can deliver to you much more information than I can in a single reply.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
I have a gridview with a checkbox column, i select a checkbox in a row and click edit button after that, edit button click_event i wrote this:
grvWorkDetail.DataKeys[grvWorkDetail.SelectedIndex].Values["WorkTimeID"].ToString()
but it has error, and i cant access to "WorkTimeID"
my codebehind is :
<asp:TemplateField ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
<asp:CheckBox ID="chk_SelectAll" runat="server" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chk_Select" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center"
|
|
|
|
|
Please do not post the same question in multiple forums.
One of these days I'm going to think of a really clever signature.
|
|
|
|